File tree Expand file tree Collapse file tree 2 files changed +23
-18
lines changed Expand file tree Collapse file tree 2 files changed +23
-18
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,11 @@ describe('Execute: stream directive', () => {
483
483
} ,
484
484
] ,
485
485
} ,
486
+ ] ,
487
+ hasNext : true ,
488
+ } ,
489
+ {
490
+ incremental : [
486
491
{
487
492
items : [ { name : 'Leia' , id : '3' } ] ,
488
493
path : [ 'friendList' , 2 ] ,
Original file line number Diff line number Diff line change @@ -1183,31 +1183,31 @@ function completeListItemValue(
1183
1183
itemPath : Path ,
1184
1184
asyncPayloadRecord ?: AsyncPayloadRecord ,
1185
1185
) : boolean {
1186
- try {
1187
- let completedItem ;
1188
- if ( isPromise ( item ) ) {
1189
- completedItem = item . then ( ( resolved ) =>
1190
- completeValue (
1191
- exeContext ,
1192
- itemType ,
1193
- fieldNodes ,
1194
- info ,
1195
- itemPath ,
1196
- resolved ,
1197
- asyncPayloadRecord ,
1198
- ) ,
1199
- ) ;
1200
- } else {
1201
- completedItem = completeValue (
1186
+ if ( isPromise ( item ) ) {
1187
+ completedResults . push (
1188
+ completePromiseCatchingErrors (
1202
1189
exeContext ,
1203
1190
itemType ,
1204
1191
fieldNodes ,
1205
1192
info ,
1206
1193
itemPath ,
1207
1194
item ,
1208
1195
asyncPayloadRecord ,
1209
- ) ;
1210
- }
1196
+ ) ,
1197
+ ) ;
1198
+ return true ;
1199
+ }
1200
+
1201
+ try {
1202
+ const completedItem = completeValue (
1203
+ exeContext ,
1204
+ itemType ,
1205
+ fieldNodes ,
1206
+ info ,
1207
+ itemPath ,
1208
+ item ,
1209
+ asyncPayloadRecord ,
1210
+ ) ;
1211
1211
1212
1212
if ( isPromise ( completedItem ) ) {
1213
1213
// Note: we don't rely on a `catch` method, but we do expect "thenable"
You can’t perform that action at this time.
0 commit comments