https://github.com/pytal/graphql-codegen-join-documents
Join GraphQL queries/mutations/subscriptions
https://github.com/pytal/graphql-codegen-join-documents
code-generator codegen graphql
Last synced: 12 months ago
JSON representation
Join GraphQL queries/mutations/subscriptions
- Host: GitHub
- URL: https://github.com/pytal/graphql-codegen-join-documents
- Owner: Pytal
- License: mit
- Created: 2020-05-31T18:05:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-07T17:29:54.000Z (about 4 years ago)
- Last Synced: 2025-03-11T19:45:58.595Z (about 1 year ago)
- Topics: code-generator, codegen, graphql
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# graphql-codegen-join-documents
A plugin for [GraphQL Code Generator](https://graphql-code-generator.com/docs/getting-started/index) 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](https://hasura.io/docs/1.0/graphql/manual/deployment/allow-list.html) feature of [Hasura GraphQL-Engine](https://github.com/hasura/graphql-engine)
## Installation
``` bash
npm add -D graphql-codegen-join-documents
```
## Usage
Enter the following into `codegen.yaml`:
``` yaml
schema: schema.graphql
documents: src/**/*.gql
generates:
queries.gql:
plugins:
- graphql-codegen-join-documents
```
Run codegen:
``` bash
npx graphql-codegen
```