-
Notifications
You must be signed in to change notification settings - Fork 470
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
Avoid re-introspecting within local graphql
context and exclude client-only directives.
#614
Merged
Conversation
This file contains 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
…xecute`. ...which is an incoming change.
This method is only used from the same file. There's no need to export it here?
… with introspection query
The GraphQL executor is capable of producing its own, more useful errors and we destroy those boundaries by trying this entire block since there are no less than three different error sources.
This name is certainly more appropriate, and shorter to boot. Feedback from: @martijnwalraven.
A global error helper would be better, but a properly surfaced `Error`, rather than a `console.error` will suffice for now. Feedback from: @martijnwalraven Ref: https://github.com/apollographql/apollo-cli/pull/614/files/c3054817ecde88f2ec4af6781c2368bb4c71e5e1#r222585753
abernix
commented
Oct 4, 2018
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.
Thank you for the review, @martijnwalraven!
graphql
context and exclude server-only directives.graphql
context and exclude client-only directives.
jbaxleyiii
approved these changes
Oct 4, 2018
Thanks for adding me @abernix, reading PRs like this will help me gain context much more quickly 😄 |
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.
Note: This PR depends on #611 and #613 and merges into #611. If #611 lands first, this should be re-targeted to land inmaster
.The commits in this PR avoid re-running the introspection result from a GraphQL server as a client schema when not necessary. This is particularly important to maintain an introspection result which is consistent with the version of
graphql
which is used on the actual GraphQL server being introspected. Previously, this was re-running that introspection in the Apollo CLI’sgraphql
executor which produced a different result since there is no guarantee that the server is usinggraphql@0.13.2
, the version currently used by theapollo
CLI.Additionally, thanks to @jbaxleyiii’s work in 88a248c, operations in the manifest now properly consider common dynamic transformations to operations like client-only directives (e.g.
@client
,@connection
) and additions of__typename
fields, as is common under normal Apollo Client use.