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 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[] }; 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" } } },