From 394584e3363981e3d65576dcfe74d94473eb88ef Mon Sep 17 00:00:00 2001 From: Tomoya Kashifuku Date: Sat, 1 Jul 2023 15:28:26 +0900 Subject: [PATCH 1/3] update CodegenConfig type (add property) --- packages/utils/plugins-helpers/src/types.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/utils/plugins-helpers/src/types.ts b/packages/utils/plugins-helpers/src/types.ts index 48b75d28c5a..3f1f0804a94 100644 --- a/packages/utils/plugins-helpers/src/types.ts +++ b/packages/utils/plugins-helpers/src/types.ts @@ -543,6 +543,10 @@ export namespace Types { * For more details: https://graphql-code-generator.com/docs/config-reference/lifecycle-hooks */ hooks?: Partial; + /** + * @description Alows to raise errors if any matched files are not valid GraphQL. Default: false. + */ + noSilentErrors?: boolean; } export type ComplexPluginOutput = { content: string; prepend?: string[]; append?: string[] }; From be1e53cabe9ac72c2403fa9da075d4e46949f2dc Mon Sep 17 00:00:00 2001 From: Tomoya Kashifuku Date: Sat, 1 Jul 2023 15:31:40 +0900 Subject: [PATCH 2/3] update config.schema.json by building website run `yarn build` in website --- website/public/config.schema.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/public/config.schema.json b/website/public/config.schema.json index 5d2f0cdcd64..1b44d7811b4 100644 --- a/website/public/config.schema.json +++ b/website/public/config.schema.json @@ -96,6 +96,10 @@ "hooks": { "$ref": "#/definitions/Partial", "description": "Specifies scripts to run when events are happening in the codegen core.\nHooks defined on that level will effect all output files.\n\nFor more details: https://graphql-code-generator.com/docs/config-reference/lifecycle-hooks" + }, + "noSilentErrors": { + "description": "Alows to raise errors if any matched files are not valid GraphQL. Default: false.", + "type": "boolean" } } }, From 5282e9eff79146d92375e2ec31bd889ad65e7496 Mon Sep 17 00:00:00 2001 From: Tomoya Kashifuku Date: Sun, 9 Jul 2023 21:04:04 +0900 Subject: [PATCH 3/3] add a changeset --- .changeset/large-wombats-beam.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/large-wombats-beam.md diff --git a/.changeset/large-wombats-beam.md b/.changeset/large-wombats-beam.md new file mode 100644 index 00000000000..dd271de024d --- /dev/null +++ b/.changeset/large-wombats-beam.md @@ -0,0 +1,5 @@ +--- +'@graphql-codegen/plugin-helpers': patch +--- + +add noSilentErrors option to the config type