Add SDL for rest directive#228
Add SDL for rest directive#228fbartho merged 1 commit intoapollographql:masterfrom jasonpaulos:client-schema-defs
Conversation
Codecov Report
@@ Coverage Diff @@
## master #228 +/- ##
=======================================
Coverage 92.71% 92.71%
=======================================
Files 3 3
Lines 412 412
Branches 123 123
=======================================
Hits 382 382
Misses 28 28
Partials 2 2Continue to review full report at Codecov.
|
There was a problem hiding this comment.
I have no problem adding this schema.graphql file into our exports. Thanks for figuring all that out!
Does this mean apollo-cli code generation will also understand the @rest(…) directive going forwards?
Additional question, if a user is using: apollo-link-rest, local state through resolvers, and an ApolloServer backend, how should they configure their apollo.config.js file?
-- Relatedly, should we add your example apollo.config.js entries into the links/rest docs? (https://github.com/apollographql/apollo-link-rest/tree/master/docs mirroring the content from: https://github.com/apollographql/apollo-link/tree/master/docs/source/links/rest.md rendered at https://www.apollographql.com/docs/link/links/rest.html)
Are there any useful unit tests that we can apply here?
Since version 1.10.0 of the Apollo VS Code extension, which by default requires definitions for all directives, I believe
apollo-link-restshould provide a schema definition for the@restdirective. This definition can then be used as follows in theapollo.config.jsfile that the VS Code extension reads:This will allow developers to validate their use of directives and provide many IntelliSense features, such as autocompletion and argument information on hover for directives. A history of the relevant VS Code changes can be found here: apollographql/apollo-tooling#1433
Here is a similar PR for
apollo-client: apollographql/apollo-client#5205