Add SDL for client directives#5205
Merged
hwillson merged 2 commits intoapollographql:masterfrom Sep 4, 2019
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Since apollographql/apollo-tooling#1433 was merged for the Apollo VS Code extension, which by default requires definitions for all directives, I believe
apollo-clientshould provide definitions for its custom directives. These definitions can be used as follows in theapollo.config.jsfile that the VS Code extension reads:While the above pull request makes an exception for
apollo-clientby automatically including a version of theapollo-clientdirectives defined here, I believe that the definitions should ideally live in this repository so that they can grow with theapollo-clientcodebase. Additionally, the presence of aschema.graphqlfile will allow users to include the directives as shown above, in case they want to override the Apollo directives provided by the extension.To my understanding, the addition of
schema.graphqlwill increase theapollo-clientpackage size, but should not result in an increase to the bundle size of any app usingapollo-client, sinceschema.graphqlis used only during build time.I'm curious to hear any feedback 🙂
Here is a similar PR for
apollo-link-rest: apollographql/apollo-link-rest#228