Skip to content
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
merged 12 commits into from
Oct 8, 2018

Conversation

abernix
Copy link
Member

@abernix abernix commented Oct 4, 2018

Note: This PR depends on #611 and #613 and merges into #611. If #611 lands first, this should be re-targeted to land in master.


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’s graphql executor which produced a different result since there is no guarantee that the server is using graphql@0.13.2, the version currently used by the apollo 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.

abernix and others added 8 commits October 3, 2018 21:46
…xecute`.

...which is an incoming change.
This method is only used from the same file.  There's no need to export it
here?
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.
Copy link
Member Author

@abernix abernix left a 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!

@jbaxleyiii jbaxleyiii changed the title Avoid re-introspecting within local graphql context and exclude server-only directives. Avoid re-introspecting within local graphql context and exclude client-only directives. Oct 4, 2018
@trevor-scheer
Copy link
Member

Thanks for adding me @abernix, reading PRs like this will help me gain context much more quickly 😄

@abernix abernix changed the base branch from abernix/relocate-common-tasks to vNEXT October 8, 2018 18:28
@abernix abernix merged commit 57c019e into vNEXT Oct 8, 2018
@JakeDawkins JakeDawkins deleted the abernix/restructure-introspection-query branch January 22, 2019 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants