Skip to content

Conversation

tobias-tengler
Copy link
Member

@tobias-tengler tobias-tengler commented Jun 20, 2025

Given the following query:

{
  something { # Subraph 1
    something  # Subraph 1
  }
  viewer {  # Subraph 1 & 2
    exclusiveSubgraphB  # Subraph 2
  }
}

The weighting algorithm will determine it should first plan for Subgraph 1.
The resulting execution step for Subgraph 1 will currently end up with the following selection set as it includes viewer but then doesn't have anything it can resolve from Subgraph 1:

{
  something {
    something
  }
  viewer {
   # empty
  }
}

This PR adds some checks to remove the empty viewer selection from the Subgraph 1 execution step, so it doesn't crash further down the line when attempting to create a request document for the subgraph call.

@tobias-tengler
Copy link
Member Author

Test failures seem unrelated.

@tobias-tengler tobias-tengler force-pushed the tte/fix-bug-with-shared-parent-field branch from 9382fd4 to 176d8a9 Compare June 20, 2025 14:00
@michaelstaib michaelstaib merged commit 807db21 into main-version-15 Jun 25, 2025
202 of 207 checks passed
@michaelstaib michaelstaib deleted the tte/fix-bug-with-shared-parent-field branch June 25, 2025 14:33
@michaelstaib michaelstaib added this to the HC-15.1.7 milestone Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants