-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add noSilentErrors
option to the config type
#9523
Add noSilentErrors
option to the config type
#9523
Conversation
run `yarn build` in website
🦋 Changeset detectedLatest commit: 5282e9e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -543,6 +543,10 @@ export namespace Types { | |||
* For more details: https://graphql-code-generator.com/docs/config-reference/lifecycle-hooks | |||
*/ | |||
hooks?: Partial<LifecycleHooksDefinition>; | |||
/** | |||
* @description Alows to raise errors if any matched files are not valid GraphQL. Default: false. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote this description in reference to https://the-guild.dev/graphql/tools/docs/api/modules/loaders_code_file_src#type-declaration
I didn't understand what I have to check with this item in the checklist. I would appreciate if you tell me. |
Nothing to do for this one since there are no dependency changes. But to get your fix out can you please run |
Description
Related #9515
The
noSilentErrors
option has already been implemented but not in the config type.Type of change
Please delete options that are not relevant.
(The "Bug fix" above is about fixing the type error.)
Screenshots/Sandbox (if appropriate/relevant):
Sandbox: https://github.com/tnyo43/graphql-code-generator-issue-sandbox-no-silent-error
You will see that the
noSilentErrors
option works but is not included in the config type if you follow the example in the README.How Has This Been Tested?
1.1. clone this repository and checkout to this branch (tnyo43:add-no-silent-errors-option-in-config-type)
1.2. update line 47 in "packages/graphql-codegen-cli/package.json" as
"@graphql-codegen/plugin-helpers": "file:../utils/plugins-helpers",
.1.3. run
yarn build
.2.1. clone the sandbox (https://github.com/tnyo43/graphql-code-generator-issue-sandbox-no-silent-error).
2.2. update line 10 in "package.json" to use the local @graphql-codegen/cli (ex
"@graphql-codegen/cli": "file:../graphql-code-generator/packages/graphql-codegen-cli",
).noSilentErrors
option in "codegen.ts". You will see no type errors.Test Environment:
@graphql-codegen/...
:Checklist:
Further comments
N/A