fix(incrementalDelivery): fix null bubbling with async iterables #3760
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.
extracted from #3754
This is actually more than a simple refactoring, as it includes a bug fix.
When a non-null list is streamed and completeValue for a list item fails, the error should bubble up to the list itself and no further payloads should be sent.
Previously, this was case only when the field resolver for the list returned an iterable, but not when it returned an async iterable. In the latter case, the null correctly bubbles to the list itself for the given payload (
items: null
rather thanitems: [null
), but further payloads would still be sent. This PR aligns async iterables to the behavior of iterables where further payloads will not be sent.