From 6adb422ec9bd9990c848f749a2b97d541ae3edfb Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 1 Jul 2020 21:42:04 -0700 Subject: [PATCH] Add README --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c7c91f5 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# graphql-codegen-join-documents +A plugin for [GraphQL Code Generator](https://graphql-code-generator.com/docs/getting-started/index) to join GraphQL queries/mutations/subscriptions together into a single file. + +## Usage +Install the plugin: +``` bash +npm add -D graphql-codegen-join-documents +``` + +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 +```