-
Notifications
You must be signed in to change notification settings - Fork 61
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: Introspection-based schema download creates duplicate @defer
directive
#440
fix: Introspection-based schema download creates duplicate @defer
directive
#440
Conversation
✅ Deploy Preview for eclectic-pie-88a2ba canceled.
|
✅ Deploy Preview for apollo-ios-docc canceled.
|
new Source(documentString, "Test Query", { line: 1, column: 1 }) | ||
); | ||
|
||
it("ensure the introspection JSON is correct for test", () => { |
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.
Introspection JSON is difficult to parse and read so I've added tests like this one to ensure that the JSON doesn't get changed in a way that would invalidate what the test is meant to be checking for.
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.
LGTM
83488f68 fix: Introspection-based schema download creates duplicate `@defer` directive (#440) git-subtree-dir: apollo-ios-codegen git-subtree-split: 83488f68370f0c7ec5bb3239218c737a1b7a9650
… download creates duplicate `@defer` directive git-subtree-dir: apollo-ios-codegen git-subtree-mainline: b14cab1 git-subtree-split: 83488f68370f0c7ec5bb3239218c737a1b7a9650
Fixes apollographql/apollo-ios#3417
This changeset splits the logic for adding the defer directive to the document between SDL and introspection sources. SDL sources can be inspected as a
DocumentNode
with all declared directives available but introspection sources, once converted to aDocumentNode
, do not contain all declared directives and instead need to be inspected as the schema built from the introspection source; I do not know whether this is a bug in graphql-js or intended behaviour but I will take that up with them separately.ApolloSchemaDownloaderInternalTests
to ensure that even though the JS logic has been fixed there isn't some fetch-schema-workflow specific difference to creating the duplicate directive.