Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended Query being reported as a different to a non-extended Query, when it is actually the same. #44

Open
andyce1010 opened this issue Dec 13, 2021 · 2 comments

Comments

@andyce1010
Copy link

andyce1010 commented Dec 13, 2021

When comparing a query where the expected type has been extended to exactly match the actual type, the comparator is currently reporting a change.

Can someone confirm if this is correct? I would have expected the two queries to show no changes.

Expected:

type Query {
}

extend type Query {
   test(id: String!): String!
}

Actual:

type Query {	
   test(id: String!): String!
}

Output:
`⏳ Checking for changes...
🎉 Done! Result:

Detected the following changes between schemas:

✅ Field test was added to object type Query
`

@andyce1010 andyce1010 changed the title Extended Query being reported as a different to a non-extendededed Query, when it is actually the same. Extended Query being reported as a different to a non-extended Query, when it is actually the same. Dec 13, 2021
@swalkinshaw
Copy link
Collaborator

Just to confirm, are expected and actual the two schemas you're comparing?

I'd probably expect the diff between those to show no changes either. This might also be behaviour from the graphql-ruby gem itself. I'd suggest running GraphQL::Schema.from_definition(schema).to_definition to see what it outputs for the schema with extend

@andyce1010
Copy link
Author

Yes that's right.

Thanks, unfortunately I have zero ruby knowledge, but I will try and figure out if i can do that tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants