Skip deferred fragments in collectFields only when same label is used - #4841
Open
robrichard wants to merge 1 commit into
Open
Skip deferred fragments in collectFields only when same label is used#4841robrichard wants to merge 1 commit into
robrichard wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
robrichard
marked this pull request as draft
July 22, 2026 14:39
robrichard
marked this pull request as ready for review
July 22, 2026 14:39
robrichard
force-pushed
the
robrichard/skip-defer-by-label
branch
2 times, most recently
from
July 22, 2026 14:46
e5c18f6 to
d72dfca
Compare
robrichard
force-pushed
the
robrichard/skip-defer-by-label
branch
from
July 22, 2026 15:50
d72dfca to
71a94a7
Compare
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.
For this case:
Currently the second spread of TopFragment gets skipped by the visited fragment check and the result is:
I think this will be an issue for clients. Since no pending is sent for the fragment with the DeferTop2 label, clients will assume this fragment has been inlined (not deferred), but the necessary fields have not been included in the initial result.
This PR updates the visited fragment check to only skip deferred fragments that have already been collected with the same label, while still preventing infinite loops from circular fragment references
New response: