From b47e5c6a5b08c030c7450a2f342bbdf59c28147b Mon Sep 17 00:00:00 2001 From: Mathias Vestergaard Date: Fri, 28 Jun 2019 00:54:13 +0200 Subject: [PATCH] Add config option for disabling output formatting --- docs/getting-started/codegen-config.md | 4 +++- packages/graphql-codegen-cli/src/codegen.ts | 2 +- packages/utils/plugins-helpers/src/types.ts | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/codegen-config.md b/docs/getting-started/codegen-config.md index f9b82c5e5fa..6bb363952bf 100644 --- a/docs/getting-started/codegen-config.md +++ b/docs/getting-started/codegen-config.md @@ -48,7 +48,9 @@ Here are the supported options that you can define in the config file (see [sour - [**`config`**](./config-field#root-level) - Options that we would like to provide to the specified plug-ins. The options may vary depends on what plug-ins you specified. Read the documentation of that specific plug-in for more information. [You can read more about how to pass configuration to plugins here](./config-field) - **`overwrite`** - A flag to overwrite files in case they're already exist when generating code (`true` by default) -- + +- **`prettify`** - A flag that enables formatting of generated code (using [`prettier`](https://prettier.io/)) (`true` by default) + - **`watch`** - A flag to watch for changes in the specified GraphQL schemas and re-generate code any that happens. You can either specify a boolean to turn it on/off, or specify an array of glob patterns to add custom files to the watch. - **`silent`** - A flag to not print errors in case they occur. diff --git a/packages/graphql-codegen-cli/src/codegen.ts b/packages/graphql-codegen-cli/src/codegen.ts index 814dc5e8df2..04fbe7ddb7f 100644 --- a/packages/graphql-codegen-cli/src/codegen.ts +++ b/packages/graphql-codegen-cli/src/codegen.ts @@ -244,7 +244,7 @@ export async function executeCodegen(config: Types.Config): Promise;