Conversation
c7532d1 to
6e76340
Compare
6e76340 to
3c6dfb3
Compare
Contributor
I believe the current specification has For what it's worth, I support #1045 as well as this change. :) |
leebyron
added a commit
that referenced
this pull request
Jun 30, 2025
leebyron
added a commit
that referenced
this pull request
Jun 30, 2025
c776fa7 to
97d43ba
Compare
leebyron
added a commit
that referenced
this pull request
Jul 1, 2025
* Extract common logic from ExecuteQuery, ExecuteMutation and ExecuteSubscriptionEvent * Change ExecuteSelectionSet to ExecuteGroupedFieldSet * Correct reference to MergeSelectionSets * move Field Collection section earlier (#1111) * Define 'grouped field set' * that -> which * More similar to prior wording * Remove reason from definition * subGroupedFieldSet -> fieldGroupedFieldSet * Add note for clarity * move field collections into one section, section reworking, minor word tweaking, enum * Apply suggestions from code review * Rename 'ExecuteGroupedFieldSet' to 'ExecuteCollectedFields' * Lee editorial + manual merge #1161 * also rename grouped field set -> collected fields map * include changes after merging master * fixup map iterations * editorial --------- Co-authored-by: Yaacov Rydzinski <[email protected]> Co-authored-by: Lee Byron <[email protected]>
Member
Author
|
This was merged into #1039 and since merged into the spec. |
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.
Extension to #1039
Currently:
I propose that we defined "field set" to be an ordered set (rather than list) of fields that all share the same response name. This makes a lot of the spec clearer, e.g. it's much clearer why
ExecuteField()should receive a "field set" (since they all share the same response name) rather than simply receiving "fields".Essentially I propose:
This also makes the term "grouped field set" a lot clearer.
It also increases efficiency; consider this query:
Prior to this change:
ExecuteRootSelectionSetusesCollectFieldsto produce this grouped field set:CompleteValuecallsCollectSubfieldsto produce this grouped field set (assumingCat):visitedFragmentsdoesn't prevent this because it doesn't work across sibling selections, only nested selectionsIf we were to have deeper nesting, this duplication would get much worse. Memory wise, this isn't a big deal, but looping-wise we're looping a lot more than we need to.
By explicitly making this a set, we remove this duplication. The phrase "if not already present" makes it clear that the first field selection "wins", which is important for ordering.