Repository navigation
[Fusion] Fix null being returned for batch item - #8383
Merged
michaelstaib merged 2 commits intoJun 25, 2025
Merged
Conversation
tobias-tengler
force-pushed
the
tte/fix-fusion-null-items-in-batchstate
branch
from
June 25, 2025 10:05
0e6d376 to
7e240d8
Compare
tobias-tengler
commented
Jun 25, 2025
tobias-tengler
commented
Jun 25, 2025
tobias-tengler
marked this pull request as ready for review
June 25, 2025 10:08
This was referenced Jul 29, 2025
This was referenced Aug 18, 2025
This was referenced Aug 25, 2025
This was referenced Jun 4, 2026
This was referenced Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Given the following query
The Gateway will first go to Subgaph 1 to retrieve the User Entity, then it will go to Subgraph 2 to retrieve the list of Feedbacks, where each feedback is associated with another User.
For each User the Gateway should go to Subgraph 1 and Subgraph 3 in parallel to retrieve the necessary information.
However it creates a sequential query plan where it first does a batch call to Subgraph 1 and then with the results from Subgraph 1 a batch call to Subgraph 3. This is another issue though and I deemed it not worth fixing with Fusion v2 around the corner.
What this PR is addressing is the case if the batch call to Subgraph 1 returns null for some of the items being requested. This currently leads to an exception when building the variables necessary for the second batch call to Subgraph 3.
This exception will cause the requested fields from Subgraph 3 to be null for all User entities.
This PR makes it so that successful batch items are not affected by a missing one.
The effect of the fix can be seen in this diff: 7e240d8#diff-e3ebe93626ac479da605def8dda43ed76779f46f685c83342add3513c107ea03