If you are using apollo-client >2.5 (or older, with apollo-link-state) to manage your app state with GraphQL, you're probably using a client-side only GraphQL schema and client-side directives such as
These types and directives are not part of your remote GraphQL schema.
If you wish to get better integration and fully type-safe types for your client-side schema as well, you can create a
.graphql file for your local schema, for example:
And then, you can merge this part of the schema with your remote schema, by specifying it as part of your
This way, the GraphQL Code Generator will generate complete typings that matches both your client fields and server fields.