-
Notifications
You must be signed in to change notification settings - Fork 491
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
Fix __type queries sometimes not returning data #540
Conversation
If the queried type was not defined it would return an empty data section instead of `__type: null` Fixes graph-gophers#539
@simhnna thank you for opening the issue and contributing with a PR. Does the response in the current version of the library actually violate the GraphQL Spec? |
https://spec.graphql.org/October2021/#sec-Schema-Introspection And https://spec.graphql.org/October2021/#sec-Executing-Fields
So yes I would say the current implementation violates the spec. I know that Apollo server returns a field with null value for such queries. If you want I can double check the JavaScript reference implementation tomorrow on my work PC, but I'm pretty certain it also returns a field with a null if asked for an unknown type. |
* Fix __type queries sometimes not returning data If the queried type was not defined it would return an empty data section instead of `__type: null` Fixes graph-gophers#539
* Fix __type queries sometimes not returning data If the queried type was not defined it would return an empty data section instead of `__type: null` Fixes graph-gophers#539
If the queried type was not defined it would return an empty data section instead of
__type: null
Fixes #539