Skip to content

Commit b9983ba

Browse files
authoredAug 6, 2020
isFinal > hasNext rfc (#745)
1 parent 2d67b69 commit b9983ba

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎rfcs/DeferStream.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
RFC: GraphQL Defer and Stream Directives
22
-------
33

4-
*Working Draft - January 2020*
4+
*Working Draft - July 2020*
55

66
# Introduction
77

@@ -68,7 +68,7 @@ Each subsequent payload will be an object with the following properties
6868
* `label`: The string that was passed to the label argument of the `@defer` or `@stream` directive that corresponds to this results.
6969
* `data`: The data that is being delivered incrementally.
7070
* `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.
7272
* `errors`: An array that will be present and contain any field errors that are produced while executing the deferred or streamed selection set.
7373
* `extensions`: For implementors to extend the protocol
7474

@@ -104,30 +104,31 @@ fragment GroupAdminFragment {
104104
// payload 1
105105
{
106106
data: {id: 1},
107-
isFinal: false
107+
hasNext: true
108108
}
109109
110110
// payload 2
111111
{
112112
label: "friendStream"
113113
path: [“viewer”, “friends”, 1],
114114
data: {id: 4},
115-
isFinal: false
115+
hasNext: true
116116
}
117117
118118
// payload 3
119119
{
120120
label: "friendStream"
121121
path: [“viewer”, “friends”, 2],
122122
data: {id: 5},
123-
isFinal: false
123+
hasNext: true
124124
}
125125
126126
// payload 4
127127
{
128128
label: "groupAdminDefer",
129129
path: [“viewer”],
130130
data: {managed_groups: [{id: 1, id: 2}]}
131+
hasNext: false
131132
}
132133
```
133134

0 commit comments

Comments
 (0)
Please sign in to comment.