Skip to content

feat: add flag SkipNullVariablesError#3024

Open
alepane21 wants to merge 2 commits into
mainfrom
ale/eng-9794-investigation-apollo-compatibility-handle-null-var-in-non
Open

feat: add flag SkipNullVariablesError#3024
alepane21 wants to merge 2 commits into
mainfrom
ale/eng-9794-investigation-apollo-compatibility-handle-null-var-in-non

Conversation

@alepane21

@alepane21 alepane21 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added a compatibility option to skip errors for null variables during request validation.
    • Exposed the setting via configuration, schema, defaults, and full config examples.
  • Bug Fixes
    • Updated router variable validation to honor the new compatibility flag.
  • Chores
    • Bumped the router dependency to a newer patch build.

Checklist

Open Source AI Manifesto

This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 53fd30d9-d625-4cb3-9b14-2c2ceea6765f

📥 Commits

Reviewing files that changed from the base of the PR and between e682b66 and 5752a94.

📒 Files selected for processing (2)
  • router/pkg/config/testdata/config_defaults.json
  • router/pkg/config/testdata/config_full.json
✅ Files skipped from review due to trivial changes (1)
  • router/pkg/config/testdata/config_defaults.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • router/pkg/config/testdata/config_full.json

Walkthrough

Adds an Apollo Router compatibility flag for skipping null-variable validation errors, exposes it in config schema/defaults/full config, wires it into variable validation and usage tracking, and updates graphql-go-tools dependencies in router modules.

Changes

Apollo Router skip-null-variables flag

Layer / File(s) Summary
Config flag contract
router/pkg/config/config.go, router/pkg/config/config.schema.json, router/pkg/config/testdata/config_*.json
ApolloRouterCompatibilityFlags gains SkipNullVariablesError, the schema adds skip_null_variables_error.enabled, and the config fixtures include the new default value.
Validator wiring and usage tracking
router/go.mod, router-tests/go.mod, router/core/operation_processor.go, router/core/router_config.go
github.com/wundergraph/graphql-go-tools/v2 is bumped in both modules, createParseKit passes SkipNullVariablesError into VariablesValidatorOptions, and Config.Usage() records the flag.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • wundergraph/cosmo#2913: Shares the github.com/wundergraph/graphql-go-tools/v2 dependency bump in router/go.mod and router-tests/go.mod.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding the SkipNullVariablesError feature flag.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

❌ Internal Query Planner CI checks failed

The Internal Query Planner CI checks failed in the celestial repository, and this is going to stop the merge of this PR.
If you are part of the WunderGraph organization, you can see the PR with more details.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.42%. Comparing base (f144989) to head (5752a94).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3024       +/-   ##
===========================================
+ Coverage   46.53%   61.42%   +14.89%     
===========================================
  Files        1120      259      -861     
  Lines      154966    30047   -124919     
  Branches    10060        0    -10060     
===========================================
- Hits        72107    18456    -53651     
+ Misses      81025    10103    -70922     
+ Partials     1834     1488      -346     
Files with missing lines Coverage Δ
router/core/operation_processor.go 85.12% <100.00%> (+0.01%) ⬆️
router/core/router_config.go 93.82% <100.00%> (ø)
router/pkg/config/config.go 82.29% <ø> (ø)

... and 865 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alepane21 alepane21 marked this pull request as ready for review June 27, 2026 13:35
@alepane21 alepane21 requested a review from a team as a code owner June 27, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant