-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Exclude unused standard types from the schema #974
Exclude unused standard types from the schema #974
Conversation
Should |
Codecov Report
@@ Coverage Diff @@
## master #974 +/- ##
=========================================
Coverage 94.27% 94.27%
Complexity 50 50
=========================================
Files 118 118
Lines 9577 9579 +2
=========================================
+ Hits 9029 9031 +2
Misses 548 548
Continue to review full report at Codecov.
|
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.
Schema::getType()
should return null
for unused standard types (graphql-js
returns undefined
): https://github.com/graphql/graphql-js/blob/v15.6.1/src/utilities/__tests__/buildASTSchema-test.js#L161-L168
There is a test for it in 33c6bc1
(#928) you can copy here.
Thanks @vhenzl for bringing that up. I noticed that difference before and changed the implementation of a test to use I documented the difference for now (see #964 (comment)) and plan to leave the issue open until we can resolve it fully. Unless you have an idea how to fix our implementation, I would like to go ahead with this PR. It does at least fix the externally observable behaviour in regards to introspection. |
Right, makes sense. |
Improves our behaviour in regards to #964, except
Schema::getType()