-
-
Notifications
You must be signed in to change notification settings - Fork 916
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 error message when no query is defined #3170
Conversation
Problem: this means that without a query type, introspection queries cannot be performed anymore with this PR. And we have a test that validates an introspection query for a schema without a query type !!! |
We should consider revising our schema introspection to require a query root type, as the spec requires -- and changing all of the tests as required. |
I remember how I read discussions regarding it ). Hot topic. |
Codecov Report
@@ Coverage Diff @@
## master #3170 +/- ##
==========================================
- Coverage 84.43% 84.43% -0.01%
==========================================
Files 371 371
Lines 16087 16099 +12
Branches 2599 2604 +5
==========================================
+ Hits 13583 13593 +10
Misses 1882 1882
- Partials 622 624 +2
Continue to review full report at Codecov.
|
@sungam3r I fixed the tests. I see you already approved this PR, but I'll wait to merge it until tomorrow, so you have a chance to see my additional changes if desired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed again. 👍
This dummy field for query looks pointless though. I'm still hope that spec wg will find better solution.
Co-authored-by: Ivan Maximov <sungam3r@yandex.ru>
Currently a
ARGUMENT_NULL
error is returned to the client when a query request arrives for a schema with no root query type. This PR aligns the error message with the similar case for mutation and subscription types, until such time as we decide to disallow schemas without a root query type (in accordance with the spec).Note that there is an upcoming RFC to the spec for a validation rule to address this condition:
graphql/graphql-spec#955