@@ -2116,7 +2116,7 @@ describe('Execute: stream directive', () => {
2116
2116
2117
2117
const document = parse ( `
2118
2118
query {
2119
- friendList @stream(initialCount: 1, label:"stream-label") {
2119
+ friendList @stream(label:"stream-label") {
2120
2120
...NameFragment @defer(label: "DeferName") @defer(label: "DeferName")
2121
2121
id
2122
2122
}
@@ -2146,12 +2146,9 @@ describe('Execute: stream directive', () => {
2146
2146
const result1 = executeResult . initialResult ;
2147
2147
expectJSON ( result1 ) . toDeepEqual ( {
2148
2148
data : {
2149
- friendList : [ { id : '1' } ] ,
2149
+ friendList : [ ] ,
2150
2150
} ,
2151
- pending : [
2152
- { id : '0' , path : [ 'friendList' , 0 ] , label : 'DeferName' } ,
2153
- { id : '1' , path : [ 'friendList' ] , label : 'stream-label' } ,
2154
- ] ,
2151
+ pending : [ { id : '0' , path : [ 'friendList' ] , label : 'stream-label' } ] ,
2155
2152
hasNext : true ,
2156
2153
} ) ;
2157
2154
@@ -2160,13 +2157,18 @@ describe('Execute: stream directive', () => {
2160
2157
const result2 = await result2Promise ;
2161
2158
expectJSON ( result2 ) . toDeepEqual ( {
2162
2159
value : {
2160
+ pending : [ { id : '1' , path : [ 'friendList' , 0 ] , label : 'DeferName' } ] ,
2163
2161
incremental : [
2164
2162
{
2165
- data : { name : 'Luke ' } ,
2163
+ items : [ { id : '1 ' } ] ,
2166
2164
id : '0' ,
2167
2165
} ,
2166
+ {
2167
+ data : { name : 'Luke' } ,
2168
+ id : '1' ,
2169
+ } ,
2168
2170
] ,
2169
- completed : [ { id : '0 ' } ] ,
2171
+ completed : [ { id : '1 ' } ] ,
2170
2172
hasNext : true ,
2171
2173
} ,
2172
2174
done : false ,
@@ -2181,7 +2183,7 @@ describe('Execute: stream directive', () => {
2181
2183
incremental : [
2182
2184
{
2183
2185
items : [ { id : '2' } ] ,
2184
- id : '1 ' ,
2186
+ id : '0 ' ,
2185
2187
} ,
2186
2188
] ,
2187
2189
hasNext : true ,
@@ -2191,7 +2193,7 @@ describe('Execute: stream directive', () => {
2191
2193
const result4 = await iterator . next ( ) ;
2192
2194
expectJSON ( result4 ) . toDeepEqual ( {
2193
2195
value : {
2194
- completed : [ { id : '1 ' } ] ,
2196
+ completed : [ { id : '0 ' } ] ,
2195
2197
hasNext : true ,
2196
2198
} ,
2197
2199
done : false ,
0 commit comments