File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -531,6 +531,11 @@ describe('Execute: stream directive', () => {
531
531
} ,
532
532
] ,
533
533
} ,
534
+ ] ,
535
+ hasNext : true ,
536
+ } ,
537
+ {
538
+ incremental : [
534
539
{
535
540
items : [ { name : 'Leia' , id : '3' } ] ,
536
541
path : [ 'friendList' , 2 ] ,
Original file line number Diff line number Diff line change @@ -1191,29 +1191,18 @@ function completeListItemValue(
1191
1191
asyncPayloadRecord ?: AsyncPayloadRecord ,
1192
1192
) : boolean {
1193
1193
if ( isPromise ( item ) ) {
1194
- const completedItem = item . then ( ( resolved ) =>
1195
- completeValue (
1194
+ completedResults . push (
1195
+ completePromiseCatchingErrors (
1196
1196
exeContext ,
1197
1197
itemType ,
1198
1198
fieldNodes ,
1199
1199
info ,
1200
1200
itemPath ,
1201
- resolved ,
1201
+ item ,
1202
1202
asyncPayloadRecord ,
1203
1203
) ,
1204
1204
) ;
1205
1205
1206
- // Note: we don't rely on a `catch` method, but we do expect "thenable"
1207
- // to take a second callback for the error case.
1208
- completedResults . push (
1209
- completedItem . then ( undefined , ( rawError ) => {
1210
- const error = locatedError ( rawError , fieldNodes , pathToArray ( itemPath ) ) ;
1211
- const handledError = handleFieldError ( error , itemType , errors ) ;
1212
- filterSubsequentPayloads ( exeContext , itemPath , asyncPayloadRecord ) ;
1213
- return handledError ;
1214
- } ) ,
1215
- ) ;
1216
-
1217
1206
return true ;
1218
1207
}
1219
1208
You can’t perform that action at this time.
0 commit comments