-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
deferred fragments should not change ordering of fields within initial response #1054
Draft
yaacovCR
wants to merge
64
commits into
graphql:main
Choose a base branch
from
yaacovCR:deduplicate4
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 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
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Update Section 3 -- Type System.md Update Section 3 -- Type System.md Update Section 3 -- Type System.md Update Section 6 -- Execution.md Update Section 6 -- Execution.md Update Section 6 -- Execution.md Update Section 6 -- Execution.md Update Section 6 -- Execution.md Update Section 6 -- Execution.md Update Section 6 -- Execution.md Update Section 6 -- Execution.md Update Section 6 -- Execution.md Amend changes change initial_count to initialCount add payload fields to Response section add stream validation for overlapping fields spelling updates add note about re-execution add note about final payloads label is optional fix build Update ExecuteQuery with hasNext logic fix spelling fix spaces Update execution to add defer/stream to mutations and subscriptions clarify stream records Apply suggestions from code review Co-authored-by: Benjie Gillam <benjie@jemjie.com> missing bracket Update spec/Section 7 -- Response.md Co-authored-by: Benjie Gillam <benjie@jemjie.com> clarify line about stream record iterator update visitedFragments with defer Updates to consolidate subsequent payload logic for queries, mutations, and subscriptions Apply suggestions from code review Co-authored-by: Benjie Gillam <benjie@jemjie.com> address review feedback Add handling of termination signal more formatting fix spelling Add assertion for record type add "Stream Directives Are Used On List Fields" validation rule Add defaultValue to @stream initialCount Update spec/Section 5 -- Validation.md Co-authored-by: Benjie Gillam <benjie@jemjie.com> # Conflicts: # spec/Section 3 -- Type System.md # spec/Section 5 -- Validation.md # spec/Section 6 -- Execution.md # spec/Section 7 -- Response.md
# Conflicts: # spec/Section 3 -- Type System.md
# Conflicts: # spec/Section 3 -- Type System.md
# Conflicts: # spec/Section 3 -- Type System.md
# Conflicts: # spec/Section 3 -- Type System.md
# Conflicts: # spec/Section 7 -- Response.md
# Conflicts: # spec/Section 3 -- Type System.md # spec/Section 6 -- Execution.md
# Conflicts: # spec/Section 7 -- Response.md
# Conflicts: # spec/Section 6 -- Execution.md
# Conflicts: # spec/Section 6 -- Execution.md
# Conflicts: # spec/Section 6 -- Execution.md
…ators # Conflicts: # spec/Section 6 -- Execution.md
* add comma * remove unused parameter
* streamline stream execution Currently, these spec changes introduce a new internal function named `ResolveFieldGenerator` that is suggested parallels `ResolveFieldValue`. This function is used during field execution such that if the stream directive is specified, it is called instead of `ResolveFieldValue`. The reference implementation, however, does not require any such function, simply utilizing the result of `ResolveFieldValue`. With incremental delivery, collections completed by `CompleteValue` should be explicitly iterated using a well-defined iterator, such that the iterator can be passed to `ExecuteStreamField`. But this does not require a new internal function to be specified/exposed. Moreover, introducing this function causes a mixing of concerns between the `ExecuteField` and `CompleteValue` algorithms; Currently, if stream is specified for a field, `ExecuteField` extracts the iterator and passes it to `CompleteValue`, while if stream is not specified, the `ExecuteField` passes the collection, i.e. the iterable, not the iterator. In the stream case, this shunts some of the logic checking the validity of resolution results into field execution. In fact, it exposes a specification "bug" => in the stream case, no checking is actually done that `ResolveFieldGenerator` returns an iterator! This change removes `ResolveFieldGenerator` and with it some complexity, and brings it in line with the reference implementation. The reference implementation contains some simplification of the algorithm for the synchronous iterator case (we don't have to preserve the iterator on the StreamRecord, because there will be no early close required and we don't have to set isCompletedIterator, beacuse we don't have to create a dummy payload for termination of the asynchronous stream), We could consider also removing these bits as well, as they are an implementation detail in terms of how our dispatcher is managing its iterators, but that should be left for another change. * run prettier
* fix whitespace * complete renaming of initialItems
* Add error handling for stream iterators * also add iterator error handling within CompleteValue * incorporate feedback
yaacovCR
force-pushed
the
deduplicate4
branch
from
November 18, 2023 20:59
fec902b
to
3416cd8
Compare
yaacovCR
force-pushed
the
deduplicate4
branch
2 times, most recently
from
November 29, 2023 20:17
f4ad226
to
58f6b95
Compare
…lowing early delivery
yaacovCR
force-pushed
the
deduplicate4
branch
from
November 29, 2023 20:19
58f6b95
to
a3767ea
Compare
yaacovCR
force-pushed
the
deduplicate4
branch
from
December 1, 2023 05:34
a3767ea
to
9b274db
Compare
Requires rebasing with the changes to #1052 => and confirmation from the WG that this would be the desired behavior! |
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.
builds on #1052 and so the diff from that should be useful:
yaacovCR/graphql-spec@deduplicate3...yaacovCR:graphql-spec:deduplicate4