Skip to content

feat: add flag SkipNullVariablesError - #3024

Merged
alepane21 merged 7 commits into
mainfrom
ale/eng-9794-investigation-apollo-compatibility-handle-null-var-in-non
Jul 7, 2026
Merged

feat: add flag SkipNullVariablesError#3024
alepane21 merged 7 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

Router image scan passed

✅ No security vulnerabilities found in image:

ghcr.io/wundergraph/cosmo/router:sha-afae35e70a639c24e933bf79e30f3affb5098995

@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.80%. Comparing base (5570bf9) to head (ba59309).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3024      +/-   ##
==========================================
+ Coverage   61.77%   61.80%   +0.02%     
==========================================
  Files         261      261              
  Lines       30612    30613       +1     
==========================================
+ Hits        18912    18920       +8     
+ Misses      10184    10180       -4     
+ Partials     1516     1513       -3     
Files with missing lines Coverage Δ
router/core/operation_processor.go 85.85% <100.00%> (+0.01%) ⬆️
router/core/router_config.go 93.97% <100.00%> (ø)
router/pkg/config/config.go 82.29% <ø> (ø)

... and 3 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
@alepane21
alepane21 requested a review from a team as a code owner July 6, 2026 14:17
…ation-apollo-compatibility-handle-null-var-in-non
@mintlify

mintlify Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
wundergraphinc 🟢 Ready View Preview Jul 7, 2026, 4:55 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@alepane21
alepane21 merged commit 647701f into main Jul 7, 2026
39 checks passed
@alepane21
alepane21 deleted the ale/eng-9794-investigation-apollo-compatibility-handle-null-var-in-non branch July 7, 2026 21:14
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.

2 participants