You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rfcs/DeferStream.md
+5-4
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ Each subsequent payload will be an object with the following properties
68
68
*`label`: The string that was passed to the label argument of the `@defer` or `@stream` directive that corresponds to this results.
69
69
*`data`: The data that is being delivered incrementally.
70
70
*`path`: a list of keys (with plural indexes) from the root of the response to the insertion point that informs the client how to patch a subsequent delta payload into the original payload.
71
-
*`isFinal`: A boolean that is present and `false` when there are more payloads that will be sent for this operation.
71
+
*`hasNext`: A boolean that is present and `true` when there are more payloads that will be sent for this operation. The last payload in a multi payload response should return `hasNext: false`. `hasNext` is not required for single-payload responses to preserve backwards compatibility.
72
72
*`errors`: An array that will be present and contain any field errors that are produced while executing the deferred or streamed selection set.
73
73
*`extensions`: For implementors to extend the protocol
74
74
@@ -104,30 +104,31 @@ fragment GroupAdminFragment {
* If {objectType} provide an internal function {generatorResolver} for
704
-
generating partitially resolved valueof a list field named {fieldName}:
710
+
generating partitially resolved value of a list field named {fieldName}:
705
711
* Let {generatorResolver} be the internal function.
706
712
* Return the iterator from calling {generatorResolver}, providing
707
713
{objectValue}, {argumentValues} and {initialCount}.
@@ -712,7 +718,7 @@ Note: It is common for {resolver} to be asynchronous due to relying on reading
712
718
an underlying database or networked service to produce a value. This
713
719
necessitates the rest of a GraphQL executor to handle an asynchronous
714
720
execution flow. In addition, a commom implementation of {generator} is to leverage
715
-
asynchronos iterators or asynchronos generators provided by many programing languages.
721
+
asynchronous iterators or asynchronous generators provided by many programming languages.
716
722
717
723
### Value Completion
718
724
@@ -721,7 +727,7 @@ to the expected return type. If the return type is another Object type, then
721
727
the field execution process continues recursively. In the case where a value
722
728
returned for a list type field is an iterator due to `@stream` specified on the
723
729
field, value completition iterates over the iterator until the number of items
724
-
yield by the iterator satisfies `initial_count` specified on the `@stream` directive.
730
+
yield by the iterator satisfies `initialCount` specified on the `@stream` directive.
725
731
Unresolved items in the iterator will be stored in a stream record which the executor
726
732
resumes to execute after the initial execution finishes.
727
733
@@ -765,11 +771,11 @@ CompleteValue(fieldType, fields, result, variableValues, subsequentPayloads, par
765
771
* If {result} is {null} (or another internal value similar to {null} such as
766
772
{undefined} or {NaN}), return {null}.
767
773
* If {fieldType} is a List type:
768
-
* If {result} is a iterator:
769
-
* Let {field} be thte first entry in {fields}.
774
+
* If {result} is an iterator:
775
+
* Let {field} be the first entry in {fields}.
770
776
* Let {innerType} be the inner type of {fieldType}.
771
777
* Let {streamDirective} be the `@stream` directived provided on {field}.
772
-
* Let {initialCount} be the value or variable provided to {streamDirective}'s {initial_count} argument.
778
+
* Let {initialCount} be the value or variable provided to {streamDirective}'s {initialCount} argument.
773
779
* Let {label} be the value or variable provided to {streamDirective}'s {label} argument.
774
780
* Let {resolvedItems} be an empty list
775
781
* For each {members} in {result}:
@@ -780,7 +786,7 @@ CompleteValue(fieldType, fields, result, variableValues, subsequentPayloads, par
780
786
* Let {streamRecord} be the result of calling {CreateStreamRecord(label, initialCount, result, remainingItems, initialCount, fields, innerType, parentPath)}
781
787
* Append {streamRecord} to {subsequentPayloads}.
782
788
* Let {result} be {initialItems}.
783
-
* Exit For each loop.
789
+
* Exit for each loop.
784
790
* If {result} is not a collection of values, throw a field error.
785
791
* Let {innerType} be the inner type of {fieldType}.
786
792
* Return a list where each list item is the result of calling
0 commit comments