fix(router): incorrect alias behavior for required fields - #3101
Conversation
Router image scan passed✅ No security vulnerabilities found in image: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThe router and router-tests modules update Changes
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3101 +/- ##
==========================================
- Coverage 62.02% 61.83% -0.20%
==========================================
Files 262 262
Lines 30810 30810
==========================================
- Hits 19110 19050 -60
- Misses 10188 10233 +45
- Partials 1512 1527 +15 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@router-tests/protocol/grpc_subgraph_test.go`:
- Around line 415-419: Add a test case in the existing employee query coverage
using the aliased field `aliasedReviewReport: reviewReport`, and assert its
expected non-null value to exercise alias resolution. Retain the current
non-existent employee null-propagation case only if it is still required by the
test contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f34580ef-0c6b-4740-b80c-93dfc71feace
⛔ Files ignored due to path filters (2)
router-tests/go.sumis excluded by!**/*.sumrouter/go.sumis excluded by!**/*.sum
📒 Files selected for processing (3)
router-tests/go.modrouter-tests/protocol/grpc_subgraph_test.gorouter/go.mod
…ields-is-misbehaving
Related engine PR: wundergraph/graphql-go-tools#1606
Summary by CodeRabbit
Summary
@requiresbehavior when requested fields use aliases, including nested/abstract data and composite@requiresscenarios.@requiresqueries returnnullwhen the employee does not exist.@requiresresolution, nested alias access, and missing-employee behavior.Checklist
Open Source AI Manifesto
This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.