Skip to content

Pytal/graphql-codegen-join-documents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphql-codegen-join-documents

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

Installation

npm add -D graphql-codegen-join-documents

Usage

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