Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fusion] Fixed duplicated selections #7677

Merged
merged 5 commits into from
Nov 12, 2024
Merged

Conversation

tobias-tengler
Copy link
Collaborator

@tobias-tengler tobias-tengler commented Nov 3, 2024

Fixes #7687

@michaelstaib michaelstaib changed the title [WIP] [Fusion] Fix duplicated selections [Fusion] Fixed duplicated selections Nov 6, 2024
@michaelstaib michaelstaib marked this pull request as ready for review November 6, 2024 09:13
@tobias-tengler
Copy link
Collaborator Author

Just noticed another issue that has also existed previously: Selections on interfaces are inlined into object type selections, but not explicitly forwarded to subgraphs.

Original query:

communityItems(first: 3) {
  nodes {
    __typename
    ... on CommunityDiscussion {
      databaseId
    }
    ... on ProductQuestion {
      databaseId
    }
    ... on ProductReview {
      databaseId
    }
    ... on Node {
      __isNode: __typename
      id
    }
  }
}

Subgraph query:

communityItems(first: 3) {
  nodes {
    __typename
    ... on CommunityDiscussion {
      __typename
      databaseId
      __isNode: __typename
      id
    }
    ... on ProductQuestion {
      __typename
      databaseId
      __isNode: __typename
      id
    }
    ... on ProductReview {
      __typename
      databaseId
      __isNode: __typename
      id
    }
  }
}

@tobias-tengler tobias-tengler force-pushed the tte/fix-duplicated-selections branch from 573fc08 to a11adb9 Compare November 9, 2024 21:18
Copy link

codecov bot commented Nov 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.00%. Comparing base (02b1ca8) to head (1121c64).
Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7677      +/-   ##
==========================================
+ Coverage   73.95%   74.00%   +0.05%     
==========================================
  Files        2917     2918       +1     
  Lines      151116   151252     +136     
  Branches    17560    17576      +16     
==========================================
+ Hits       111753   111936     +183     
+ Misses      33507    33465      -42     
+ Partials     5856     5851       -5     
Flag Coverage Δ
unittests 74.00% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tobias-tengler tobias-tengler added the 👓 ready-for-review The PR is ready for review. label Nov 11, 2024
@michaelstaib michaelstaib merged commit 2cddf9d into main Nov 12, 2024
5 checks passed
@michaelstaib michaelstaib deleted the tte/fix-duplicated-selections branch November 12, 2024 06:59
@tobias-tengler tobias-tengler added the 🍒 cherry-pick Consider cherry-picking these changes into the previous major version. label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 cherry-pick Consider cherry-picking these changes into the previous major version. 🌶️ hot chocolate 👓 ready-for-review The PR is ready for review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fusion Query Planner produces excessive selections for subgraph request
2 participants