Problem
We need generate documents for multiple client from one schema.
GraphQL documents generates documents of all Query/Mutation.
So, the generated documents includes unnecessary document for a client.
It makes overhead of module size.
Suggestion
codegen.yml
overwrite: true
schema:
- ./schemas/**/*.graphql
generates:
./documents/index.graphql:
plugins:
- graphql-codegen-documents
config:
- tags:
- client
index.graphql
type Query {
books(first: Int!, offset: Int!): BooksConnection! # graphql-codegen-documents: tag=client
user(first: Int!, offset: Int!): UserConnection! # this is always target
}
I don't know graphql codegen plugin can read # comment line.
Problem
We need generate documents for multiple client from one schema.
GraphQL documents generates documents of all Query/Mutation.
So, the generated documents includes unnecessary document for a client.
It makes overhead of module size.
Suggestion
codegen.yml
index.graphql
I don't know graphql codegen plugin can read
#comment line.