-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incorrect path
attribute on query validation error
#4711
Comments
Hey, sorry I didn't get back to you on this earlier! I agree that the Also, looking back at the spec, I can see that this query doesn't violate it. It's allowed within the given grammar and not expressly prohibited elsewhere. I'll keep this open until I've checked the |
👋 Just one update on this, GraphQL-Ruby doesn't add this error to queries like this anymore (since #5030). I'm hoping to clean up these errors soon. |
Describe the bug
With this query:
This error is returned:
The issue here is
path
; it's equal to "query TestQuery" and I think it is not exactly compliant with the graphql spec which expectspath
to be an array of fields. It is an issue for us because we use a federation router in front of the graphql server andpath
is invalid for the router in this case.Versions
graphql
version: 2.1rails
version: 7.0.7Expected behavior
Maybe
path
shouldn't be set when there's a validation error in the query arguments as some other graphql implementations seem to do that.(It's a separate topic but some implementations accept default values for non-null variables and it's not clear to me what is the right behavior per the spec.)
The text was updated successfully, but these errors were encountered: