Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions rfcs/DeferStream.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RFC: GraphQL Defer and Stream Directives
-------

*Working Draft - January 2020*
*Working Draft - July 2020*

# Introduction

Expand Down Expand Up @@ -68,7 +68,7 @@ Each subsequent payload will be an object with the following properties
* `label`: The string that was passed to the label argument of the `@defer` or `@stream` directive that corresponds to this results.
* `data`: The data that is being delivered incrementally.
* `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.
* `isFinal`: A boolean that is present and `false` when there are more payloads that will be sent for this operation.
* `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.
* `errors`: An array that will be present and contain any field errors that are produced while executing the deferred or streamed selection set.
* `extensions`: For implementors to extend the protocol

Expand Down Expand Up @@ -104,30 +104,31 @@ fragment GroupAdminFragment {
// payload 1
{
data: {id: 1},
isFinal: false
hasNext: true
}

// payload 2
{
label: "friendStream"
path: [“viewer”, “friends”, 1],
data: {id: 4},
isFinal: false
hasNext: true
}

// payload 3
{
label: "friendStream"
path: [“viewer”, “friends”, 2],
data: {id: 5},
isFinal: false
hasNext: true
}

// payload 4
{
label: "groupAdminDefer",
path: [“viewer”],
data: {managed_groups: [{id: 1, id: 2}]}
hasNext: false
}
```

Expand Down