A plugin for GraphQL Code Generator to join GraphQL queries/mutations/subscriptions together into a single file.
Install the plugin:
npm add -D graphql-codegen-join-documents
Enter the following into codegen.yaml
:
schema: schema.graphql
documents: src/**/*.gql
generates:
queries.gql:
plugins:
- graphql-codegen-join-documents
Run codegen:
npx graphql-codegen