fix(cli): forward nested graphql-config loader options#10590
Open
ya2s wants to merge 2 commits intodotansimha:masterfrom
Open
fix(cli): forward nested graphql-config loader options#10590ya2s wants to merge 2 commits intodotansimha:masterfrom
ya2s wants to merge 2 commits intodotansimha:masterfrom
Conversation
Ensure nested `config` values (e.g. inputValueDeprecation) are forwarded when loading schema/documents via GraphQL Config. Add a regression test covering nested config forwarding on the GraphQL Config path. Related dotansimha#9659 Co-Authored-By: Codex <codex@localhost>
🦋 Changeset detectedLatest commit: 88e5916 The changes in this PR will be included in the next version bump. 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 |
Co-Authored-By: Codex <codex@localhost>
Author
|
@eddeee888 @saihaj @AaronMoat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.
Description
When using GraphQL Config (
graphql.config.*), nestedextensions.codegen.configvalues were not forwarded toproject.loadSchema/project.loadDocuments.As a result, options such as
inputValueDeprecation: truebehaved differently compared to regularcodegen.tsconfig loading.This change aligns both code paths by forwarding
{ ...config, ...config.config }for GraphQL Config as well.Added a regression test to verify nested config values are forwarded.
Related #9659, graphql-hive/graphql-config#1453
Type of change
Screenshots/Sandbox (if appropriate/relevant):
N/A
How Has This Been Tested?
yarn workspace @graphql-codegen/cli test tests/config.spec.tspasses nested config values to graphql-config schema loaderTest Environment:
@graphql-codegen/...:@graphql-codegen/cli(workspace)Checklist:
Further comments
No additional dependencies are required.