A plugin for GraphQL Code Generator to join multiple GraphQL queries/mutations/subscriptions together into a single file, useful for allowing only a subset of queries to be executed with the Allow-list feature of Hasura GraphQL-Engine
npm add -D graphql-codegen-join-documentsEnter the following into codegen.yaml:
schema: schema.graphql
documents: src/**/*.gql
generates:
queries.gql:
plugins:
- graphql-codegen-join-documentsRun codegen:
npx graphql-codegen