Skip to content

Commit 0a424c1

Browse files
committed
allow hasNext: false on initial result
1 parent 048315e commit 0a424c1

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

spec/Section 7 -- Response.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ stream of _execution result_.
4949
:: A GraphQL request returns an _incremental stream_ when the GraphQL service
5050
has deferred or streamed data as a result of the `@defer` or `@stream`
5151
directives. When the result of the GraphQL operation is an incremental stream,
52-
the first value will be an _initial incremental stream result_, followed by one
53-
or more _incremental stream update result_.
52+
the first value will be an _initial incremental stream result_, optionally
53+
followed by one or more _incremental stream update result_.
5454

5555
### Request Error Result
5656

@@ -94,7 +94,10 @@ these entries are defined in the same way as an _execution result_ as described
9494
in the "Data", "Errors", and "Extensions" sections below.
9595

9696
The _initial incremental stream result_ must contain an entry with the key
97-
{"hasNext"}. The value of this entry must be {true}.
97+
{"hasNext"}. The value of this entry must be {true} if there are any
98+
_incremental stream update results_ in the _incremental stream_. The value of
99+
this entry must be {false} if the initial incremental stream result is the last
100+
response of the incremental stream.
98101

99102
The _initial incremental stream result_ may contain an entry with the key
100103
{"pending"}. The value of this entry must be a non-empty list of _pending

0 commit comments

Comments
 (0)