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', () => {
531531 } ,
532532 ] ,
533533 } ,
534+ ] ,
535+ hasNext : true ,
536+ } ,
537+ {
538+ incremental : [
534539 {
535540 items : [ { name : 'Leia' , id : '3' } ] ,
536541 path : [ 'friendList' , 2 ] ,
Original file line number Diff line number Diff line change @@ -1191,29 +1191,18 @@ function completeListItemValue(
11911191 asyncPayloadRecord ?: AsyncPayloadRecord ,
11921192) : boolean {
11931193 if ( isPromise ( item ) ) {
1194- const completedItem = item . then ( ( resolved ) =>
1195- completeValue (
1194+ completedResults . push (
1195+ completePromiseCatchingErrors (
11961196 exeContext ,
11971197 itemType ,
11981198 fieldNodes ,
11991199 info ,
12001200 itemPath ,
1201- resolved ,
1201+ item ,
12021202 asyncPayloadRecord ,
12031203 ) ,
12041204 ) ;
12051205
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-
12171206 return true ;
12181207 }
12191208
You can’t perform that action at this time.
0 commit comments