docs(composition): fix README inaccuracies for federateSubgraphs#2648
docs(composition): fix README inaccuracies for federateSubgraphs#2648
Conversation
- fix call signature: array arg -> params object { subgraphs, options?, version? }
- rename FederationResultSuccess/Failure -> FederationSuccess/Failure
- add missing FederationSuccess properties to table
- fix import path typo (@wundergraph.composition -> @wundergraph/composition)
- fix stale FederationResultFailure.errors reference
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
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)
WalkthroughUpdates the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2648 +/- ##
==========================================
- Coverage 45.45% 41.37% -4.08%
==========================================
Files 1027 783 -244
Lines 138084 111952 -26132
Branches 8573 8573
==========================================
- Hits 62765 46325 -16440
+ Misses 73615 65264 -8351
+ Partials 1704 363 -1341 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
composition/README.md (1)
56-57: Optional: include an explicit signature snippet forfederateSubgraphsparams.A compact inline signature (including
options?andversion?) near this section would reduce future drift and make the contract immediately scannable.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composition/README.md` around lines 56 - 57, Add a compact inline TypeScript-style signature for the federateSubgraphs function near the paragraph describing FederationResult to make the contract explicit; include the function name and parameter names with optional markers (e.g., federateSubgraphs(subgraphs: Subgraph[], options?: FederationOptions, version?: string): Promise<FederationResult>) and reference the union types FederationResult, FederationSuccess, and FederationFailure so readers can immediately see that options and version are optional and what return types to expect.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@composition/README.md`:
- Around line 56-57: Add a compact inline TypeScript-style signature for the
federateSubgraphs function near the paragraph describing FederationResult to
make the contract explicit; include the function name and parameter names with
optional markers (e.g., federateSubgraphs(subgraphs: Subgraph[], options?:
FederationOptions, version?: string): Promise<FederationResult>) and reference
the union types FederationResult, FederationSuccess, and FederationFailure so
readers can immediately see that options and version are optional and what
return types to expect.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0f5f972a-1ce9-49ba-8878-cf03dc484a17
📒 Files selected for processing (1)
composition/README.md
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary by CodeRabbit
Documentation
Refactor
Fixes several inaccuracies in the
compositionpackage README that had drifted from the actual implementation.Changes:
federateSubgraphscall signature: was documented as taking a plain array, now correctly shows a params object{ subgraphs, options?, version? }FederationResultSuccess/FederationResultFailure→FederationSuccess/FederationFailureto match the actual exported typesFederationSuccessproperties to the table:directiveDefinitionByName,fieldConfigurations,federatedGraphClientSchema,parentDefinitionDataByTypeName,subgraphConfigBySubgraphName,shouldIncludeClientSchema@wundergraph.composition→@wundergraph/compositionFederationResultFailure.errorsreference in proseChecklist