fix(fragment-matcher): don't introspect a schema that declares @defer/@stream - #10927
Open
bengry wants to merge 1 commit into
Open
fix(fragment-matcher): don't introspect a schema that declares @defer/@stream#10927bengry wants to merge 1 commit into
bengry wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 82fae91 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10894.
graphql 17's
execute()refuses to run against a schema that declares@deferor@stream, whetheror not the document uses them. The introspection query here doesn't use either, but having
@deferinthe SDL is enough to kill codegen. We declare it so
@graphql-eslintpicks it up in operations, andthere's no config option to skip past this.
Introspect a copy without them instead:
Only rebuilds when one of them is actually declared, so nothing changes otherwise.
Output is unaffected. The same schema on graphql 16 unpatched and on graphql 17 patched both give:
{ "possibleTypes": { "Node": ["User", "Post"], "Content": ["User", "Post"] } }Also ran it across our own codegen configs, generated output unchanged.
The test can't fail on the graphql 16 pinned here, since 16's
execute()doesn't throw. It startsguarding properly whenever the repo moves to 17.