Skip to content

fix(cli): forward nested graphql-config loader options#10590

Open
ya2s wants to merge 2 commits intodotansimha:masterfrom
ya2s:fix/9659-graphql-config-input-value-deprecation
Open

fix(cli): forward nested graphql-config loader options#10590
ya2s wants to merge 2 commits intodotansimha:masterfrom
ya2s:fix/9659-graphql-config-input-value-deprecation

Conversation

@ya2s
Copy link

@ya2s ya2s commented Feb 10, 2026

🚨 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.*), nested extensions.codegen.config values were not forwarded to project.loadSchema / project.loadDocuments.

As a result, options such as inputValueDeprecation: true behaved differently compared to regular codegen.ts config 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots/Sandbox (if appropriate/relevant):

N/A

How Has This Been Tested?

  • yarn workspace @graphql-codegen/cli test tests/config.spec.ts
  • Added regression test: passes nested config values to graphql-config schema loader

Test Environment:

  • OS: macOS
  • @graphql-codegen/...: @graphql-codegen/cli (workspace)
  • NodeJS: v24.11.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
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Further comments

No additional dependencies are required.

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-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest 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

@ya2s
Copy link
Author

ya2s commented Feb 10, 2026

@eddeee888 @saihaj @AaronMoat
The root cause of the deprecated field behavior is not fully fixed in this PR.
This change only fixes the GraphQL Config path so that options like inputValueDeprecation are forwarded consistently (same behavior as codegen.ts).

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.

1 participant