Expands over-eager merging of field fix to handle @defer
consistently
#2720
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.
The previously committed #2713 fixed an issue introduced by #2387, ensuring that querying the same field with different directives applications was not merged, similar to what was/is done for fragments. But the exact behaviour slightly differs between fields and fragments when it comes to
@defer
in that for fragments, we never merge 2 similar fragments where both have@defer
, which we do merge for fields. Or to put it more concretely, in the following query:the 2
... on X @defer
are not merged, resulting in 2 deferred sections that can run in parallel. But following #2713, query:will merge both
x @defer
, resulting in a single deferred section.This fix changes that later behaviour so that the 2
x @defer
are not merged and result in 2 deferred sections, consistently with both 1) the case of fragments and 2) the behaviour prior to #2387.