graphql-code-generator icon indicating copy to clipboard operation
graphql-code-generator copied to clipboard

client-preset: allow skipDocumentsValidation in config

Open schmod opened this issue 2 years ago • 1 comments

Description

Fixes a small issue raised in #8562

It appears that this line is necessary for skipDocumentsValidation to work when using the client-preset, as the setting is otherwise stripped out without being passed upstream.

Type of change

Please delete options that are not relevant.

  • [x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I checked in a fixture that uses urql's @populate directive, which violates the ScalarLeafsRule validation rule.

With the changes in this PR, I am able to successfully use the skipDocumentsValidation setting (as documented) to intentionally bypass this particular validation. Without the changes in this PR, the validation (that I asked to be skipped) will cause the codegen to fail when it is used alongside the client-preset.

Checklist:

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

schmod avatar Aug 29 '23 20:08 schmod

⚠️ No Changeset found

Latest commit: bf40f6e6e4a719d9cc60c1cfb8b7f2fda82000f0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Aug 29 '23 21:08 changeset-bot[bot]