fix: allow fields marked with @inaccessible to be used in SubscriptionFilter - #3142
Conversation
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
|
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 selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughSubscription filter validation no longer rejects inaccessible root types or fields. Kafka and NATS tests verify successful federation, filter configurations, and normalized schemas. The obsolete nested inaccessible-field fixture was removed. ChangesSubscription filter accessibility
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (1.58%) is below the target coverage (30.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #3142 +/- ##
==========================================
- Coverage 62.37% 1.58% -60.79%
==========================================
Files 262 327 +65
Lines 31003 45805 +14802
Branches 0 485 +485
==========================================
- Hits 19337 728 -18609
- Misses 10158 44763 +34605
+ Partials 1508 314 -1194 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
composition/tests/v1/directives/subscription-filter.test.ts (1)
406-407: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAssert the generated subscription filter.
federateSubgraphsSuccesschecks onlyresult.success. The test can pass if thenamecondition is silently omitted fromfieldConfigurations. Assert that the generated configuration containsfieldPath: ['name']andvalues: ['test'].The helper behavior is defined in
composition/tests/utils/utils.ts:84-97.Proposed assertion
- federateSubgraphsSuccess([subgraphR, subgraphN], ROUTER_COMPATIBILITY_VERSION_ONE); + const result = federateSubgraphsSuccess([subgraphR, subgraphN], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(result.fieldConfigurations).toContainEqual({ + argumentNames: [], + fieldName: 'one', + typeName: SUBSCRIPTION, + subscriptionFilterCondition: { + in: { + fieldPath: ['name'], + values: ['test'], + }, + }, + });🤖 Prompt for 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. In `@composition/tests/v1/directives/subscription-filter.test.ts` around lines 406 - 407, Update the test using federateSubgraphsSuccess to inspect the generated subscription filter configuration, asserting it contains fieldPath ['name'] and values ['test']; retain the existing federation success assertion while verifying the name condition was not omitted.
🤖 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.
Nitpick comments:
In `@composition/tests/v1/directives/subscription-filter.test.ts`:
- Around line 406-407: Update the test using federateSubgraphsSuccess to inspect
the generated subscription filter configuration, asserting it contains fieldPath
['name'] and values ['test']; retain the existing federation success assertion
while verifying the name condition was not omitted.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 41669638-409c-4a01-9dd4-6a56bcb63b0b
📒 Files selected for processing (2)
composition/src/v1/federation/federation-factory.tscomposition/tests/v1/directives/subscription-filter.test.ts
💤 Files with no reviewable changes (1)
- composition/src/v1/federation/federation-factory.ts
…ter-should-allow-inaccessible
Summary by CodeRabbit
Checklist
Open Source AI Manifesto
This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.