Skip to content
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

Merged

Conversation

tnyo43
Copy link
Contributor

@tnyo43 tnyo43 commented Jul 1, 2023

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.

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

(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.

Screenshot 2023-07-01 at 21 54 33

How Has This Been Tested?

  1. prepare this repository
    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. prepare the sandbox
    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",).
  3. In the sandbox, add noSilentErrors option in "codegen.ts". You will see no type errors.
Screenshot 2023-07-01 at 21 34 50

Test Environment:

  • OS:macOS v13.3.1
  • @graphql-codegen/...:
  • NodeJS:v18.16.1

Checklist:

  • I have followed the CONTRIBUTING doc and the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • [N/A] I have added tests that prove my fix is effective or that my feature works
  • [N/A] New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Further comments

N/A

@changeset-bot
Copy link

changeset-bot bot commented Jul 1, 2023

🦋 Changeset detected

Latest commit: 5282e9e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphql-codegen/plugin-helpers Patch

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

@tnyo43 tnyo43 marked this pull request as draft July 1, 2023 12:15
@@ -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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tnyo43
Copy link
Contributor Author

tnyo43 commented Jul 1, 2023

Any dependent changes have been merged and published in downstream modules

I didn't understand what I have to check with this item in the checklist. I would appreciate if you tell me.

@tnyo43 tnyo43 marked this pull request as ready for review July 1, 2023 13:05
@saihaj
Copy link
Collaborator

saihaj commented Jul 7, 2023

Any dependent changes have been merged and published in downstream modules

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 yarn changeset and create a patch for the package this way when we merge your PR we prepare for the automated release process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants