Skip to content

fix: fix selecting node under provided parent#1530

Draft
devsergiy wants to merge 2 commits into
masterfrom
fix/fix-typename-under-provided-parent
Draft

fix: fix selecting node under provided parent#1530
devsergiy wants to merge 2 commits into
masterfrom
fix/fix-typename-under-provided-parent

Conversation

@devsergiy

Copy link
Copy Markdown
Member

@coderabbitai summary

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.

Open Source AI Manifesto

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

@devsergiy devsergiy requested a review from a team as a code owner June 8, 2026 20:11
Comment thread v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go Outdated
@coderabbitai

coderabbitai Bot commented Jun 9, 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a9d3e0f8-dcf5-4920-80c7-437b418cfee6

📥 Commits

Reviewing files that changed from the base of the PR and between 55609f7 and 581c62a.

📒 Files selected for processing (2)
  • v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go
  • v2/pkg/engine/plan/datasource_filter_visitor.go
👮 Files not reviewed due to content moderation or server errors (1)
  • v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go

📝 Walkthrough

Walkthrough

This PR fixes federation planning logic for external node selection and validates the fix. A guard condition in checkNodeParent is tightened to require the current node be external when blocking selection with an external parent. A new test case verifies correct __typename inclusion for provided entities with non-resolvable resolvers.

Changes

Federation planning external node selection

Layer / File(s) Summary
External node selection guard condition
v2/pkg/engine/plan/datasource_filter_visitor.go
checkNodeParent updates the guard condition to block selection only when the parent is external AND the current node is also external and not provided, instead of blocking based on parent external and node not provided.
Test: provided entity with __typename on non-resolvable parent
v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go
New test case verifies planning and __typename selection for an entity provided via @provides when the entity resolver is marked resolvable: false.

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides the PR template but lacks substantive details about the fix beyond the checklist and manifesto reference, making it minimally related to the actual changeset. Add a detailed description explaining the bug being fixed, the specific scenario, and how the changes resolve the issue for better clarity.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: fix selecting node under provided parent' clearly summarizes the main change, which addresses selecting nodes under provided parents in the GraphQL datasource federation logic.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/fix-typename-under-provided-parent

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

@ysmolski ysmolski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devsergiy devsergiy marked this pull request as draft June 9, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants