Skip to content

fix: incorrect behavior for abstract types on required fields - #3130

Merged
dkorittki merged 3 commits into
mainfrom
ludwig/router-604-graphql-router-typename-not-detected-from-grpc-oneof
Jul 31, 2026
Merged

fix: incorrect behavior for abstract types on required fields#3130
dkorittki merged 3 commits into
mainfrom
ludwig/router-604-graphql-router-typename-not-detected-from-grpc-oneof

Conversation

@Noroth

@Noroth Noroth commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Related engine PR:
wundergraph/graphql-go-tools#1613

Summary by CodeRabbit

New Features

  • Added employee recommendations for individual work items and lists of work items.
  • Added latest work operation fields supporting approval and rejection results.
  • Added nullable operation results when no applicable operation is available.
  • Expanded support for nested interfaces, unions, aliases, lists, and batched employee requests.

Bug Fixes

  • Improved null handling for missing employees and optional abstract-type results.
  • Ensured combined scalar and abstract-type field requests resolve correctly.

Checklist

Open Source AI Manifesto

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

@Noroth
Noroth requested review from a team as code owners July 30, 2026 11:31
Comment thread router/go.mod Outdated
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Router image scan passed

✅ No security vulnerabilities found in image:

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

@coderabbitai

coderabbitai Bot commented Jul 30, 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: d16055be-1118-4392-9065-e220cada38d7

📥 Commits

Reviewing files that changed from the base of the PR and between 536bd54 and a75b1b8.

⛔ Files ignored due to path filters (2)
  • router-tests/go.sum is excluded by !**/*.sum
  • router/go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • router-tests/go.mod
  • router/go.mod
🚧 Files skipped from review as they are similar to previous changes (2)
  • router-tests/go.mod
  • router/go.mod

Walkthrough

Changes

The projects subgraph adds four expertise-backed @requires fields that return interfaces and unions. gRPC resolvers, router fixtures, mappings, schemas, dependency versions, and protocol tests now cover abstract values, batching, nullability, aliases, and missing entities.

Abstract @requires resolution

Layer / File(s) Summary
Employee abstract resolver contracts
demo/pkg/subgraphs/projects/src/schema.graphql, demo/pkg/subgraphs/projects/src/service/service.go
Employee exposes interface and union fields. ProjectsService derives concrete results from expertise and field arguments.
Test environment schema and routing wiring
router-tests/testenv/testdata/configWithGRPC.json
Fixture schemas, gRPC mappings, gateway requires selections, generated protocol schema, and field configurations are updated for the new fields and related fixture changes.
Abstract @requires protocol coverage
router-tests/protocol/grpc_subgraph_test.go, router-tests/protocol/router_plugin_test.go, router-tests/go.mod, router/go.mod
Protocol tests cover abstract selections, lists, unions, nullability, batching, aliases, mixed requires, and missing entities. The GraphQL tools dependency is updated.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the fix for incorrect abstract-type behavior on required fields.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


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

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.34%. Comparing base (e7d6208) to head (a75b1b8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3130      +/-   ##
==========================================
+ Coverage   62.16%   62.34%   +0.18%     
==========================================
  Files         262      262              
  Lines       30978    30978              
==========================================
+ Hits        19258    19314      +56     
+ Misses      10199    10156      -43     
+ Partials     1521     1508      -13     

see 12 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.

Comment thread router-tests/protocol/grpc_subgraph_test.go
@dkorittki

Copy link
Copy Markdown
Contributor

Don't forget to update engine

@dkorittki
dkorittki merged commit a552348 into main Jul 31, 2026
38 checks passed
@dkorittki
dkorittki deleted the ludwig/router-604-graphql-router-typename-not-detected-from-grpc-oneof branch July 31, 2026 14:30
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.

3 participants