-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Change "grouped field set" to be a map of ordered sets #1161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
benjie
wants to merge
18
commits into
main
Choose a base branch
from
field-set
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
c7532d1
to
6e76340
Compare
6e76340
to
3c6dfb3
Compare
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 <yaacovCR@gmail.com> Co-authored-by: Lee Byron <lee@leebyron.com>
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:
ExecuteRootSelectionSet
usesCollectFields
to produce this grouped field set:CompleteValue
callsCollectSubfields
to produce this grouped field set (assumingCat
):visitedFragments
doesn'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.