chore: subgraph fields retain info about inherited directives#2013
chore: subgraph fields retain info about inherited directives#2013
Conversation
WalkthroughA new property, Changes
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used🧬 Code Graph Analysis (1)composition/src/v1/normalization/walkers.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms (13)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Router image scan passed✅ No security vulnerabilities found in image: |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
composition/src/schema-building/types.ts (1)
102-102: Good addition, but consider adding documentation.The
inheritedDirectiveNamesproperty is well-designed usingSet<string>to avoid duplicates and follows the existing naming conventions. However, consider adding a JSDoc comment to explain its purpose and usage.+ // Set of directive names inherited from the parent object type inheritedDirectiveNames: Set<string>;composition/src/v1/normalization/normalization-factory.ts (1)
1032-1041: LGTM! Clean implementation for tracking inherited directives.The method correctly identifies which directives are inherited from the parent object based on the current context flags. The logic is straightforward and the return type matches the expected
Set<string>.Consider adding JSDoc documentation to clarify the inheritance rules:
+ /** + * Returns the set of directive names that fields inherit from their parent object. + * Fields inherit @external if the parent object is external, and @shareable if the parent object is shareable. + */ getInheritedDirectiveNames(): Set<string> {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
composition/src/schema-building/types.ts(1 hunks)composition/src/v1/federation/federation-factory.ts(1 hunks)composition/src/v1/normalization/normalization-factory.ts(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
composition/src/v1/normalization/normalization-factory.ts (1)
composition/src/utils/string-constants.ts (2)
EXTERNAL(42-42)SHAREABLE(127-127)
⏰ Context from checks skipped due to timeout of 90000ms (13)
- GitHub Check: integration_test (./events)
- GitHub Check: build_test
- GitHub Check: build_push_image
- GitHub Check: build_push_image
- GitHub Check: integration_test (./telemetry)
- GitHub Check: integration_test (./. ./fuzzquery ./lifecycle ./modules)
- GitHub Check: image_scan
- GitHub Check: build_test
- GitHub Check: build_test
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
- GitHub Check: build_test
- GitHub Check: build_push_image
🔇 Additional comments (1)
composition/src/v1/normalization/normalization-factory.ts (1)
1102-1102: Good integration of inherited directive tracking.The
inheritedDirectiveNamesproperty is correctly populated using the new helper method, ensuring each field retains information about which directives it inherited from its parent object.
Summary by CodeRabbit
Checklist