Skip to content

feat: bump graphql-go-tools to v2.0.0-rc.252, add gRPC header forwarding and nil context guard#2535

Closed
jensneuse wants to merge 2 commits intomainfrom
jensneuse/bump-graphql-tools-252
Closed

feat: bump graphql-go-tools to v2.0.0-rc.252, add gRPC header forwarding and nil context guard#2535
jensneuse wants to merge 2 commits intomainfrom
jensneuse/bump-graphql-tools-252

Conversation

@jensneuse
Copy link
Copy Markdown
Member

@coderabbitai summary

Bumps `graphql-go-tools` to v2.0.0-rc.252. Adds HTTP→gRPC metadata header forwarding: headers matching propagation rules are forwarded to gRPC subgraph calls, with unsafe/reserved headers (`grpc-*`, hop-by-hop, content-negotiation, WebSocket) automatically excluded. Also fixes a nil-context panic in `getResponseHeaderPropagation` that occurred when a parent entity is null and a downstream fetch is skipped (issue #2530).

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.
  • Documentation has been updated on https://github.com/wundergraph/cosmo-docs.
  • I have read the Contributors Guide.

… forwarding and nil context guard

Bump graphql-go-tools/v2 from rc.251 to rc.252 which adds gRPC header
forwarding (PR #1382), fixes flaky singleflight tests (PR #1393), and
guards against nil loaderHookContext on skipped fetches (PR #1394).

Router-side changes:
- Add defensive nil guard in getResponseHeaderPropagation to prevent
  panic when OnFinished is called with nil context (fixes #2530)
- Add isIgnoredHeader() with Grpc- prefix filtering to prevent reserved
  gRPC headers from being forwarded to any subgraph
- Add GRPCInterceptor support to testenv for verifying gRPC metadata

Integration tests:
- 6 tests for gRPC header forwarding as metadata (named, excluded,
  multi-value, unsafe filtered, grpc-reserved blocked, safe headers)
- 2 tests for null-parent skipped-fetch scenarios with and without
  response header propagation (reproduces #2530)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 19, 2026

Caution

Review failed

The head commit changed during the review from 20cbec4 to 4b9fce4.

✨ Finishing Touches
  • 📝 Generate docstrings

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

@jensneuse jensneuse changed the title feat(router): bump graphql-go-tools to v2.0.0-rc.252, add gRPC header forwarding and nil context guard feat: bump graphql-go-tools to v2.0.0-rc.252, add gRPC header forwarding and nil context guard Feb 19, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 19, 2026

❌ 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
Copy link
Copy Markdown

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.47%. Comparing base (88927f6) to head (4b9fce4).

Files with missing lines Patch % Lines
router/core/header_rule_engine.go 68.75% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2535      +/-   ##
==========================================
+ Coverage   61.00%   61.47%   +0.46%     
==========================================
  Files         239      239              
  Lines       25416    25425       +9     
==========================================
+ Hits        15506    15630     +124     
+ Misses       8589     8479     -110     
+ Partials     1321     1316       -5     
Files with missing lines Coverage Δ
router/core/header_rule_engine.go 83.43% <68.75%> (+0.09%) ⬆️

... and 21 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.

@jensneuse jensneuse closed this Feb 19, 2026
dkorittki added a commit that referenced this pull request Feb 19, 2026
This has been taking from another PR so we can close that one
#2535
@dkorittki
Copy link
Copy Markdown
Contributor

fyi changes from here have been incorporated into #2524. This happened in agreement with @jensneuse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants