@@ -734,15 +734,15 @@ function executeField(
734
734
return completed . then ( undefined , ( rawError ) => {
735
735
const error = locatedError ( rawError , fieldNodes , pathToArray ( path ) ) ;
736
736
const handledError = handleFieldError ( error , returnType , errors ) ;
737
- filterSubsequentPayloads ( exeContext , path ) ;
737
+ filterSubsequentPayloads ( exeContext , path , asyncPayloadRecord ) ;
738
738
return handledError ;
739
739
} ) ;
740
740
}
741
741
return completed ;
742
742
} catch ( rawError ) {
743
743
const error = locatedError ( rawError , fieldNodes , pathToArray ( path ) ) ;
744
744
const handledError = handleFieldError ( error , returnType , errors ) ;
745
- filterSubsequentPayloads ( exeContext , path ) ;
745
+ filterSubsequentPayloads ( exeContext , path , asyncPayloadRecord ) ;
746
746
return handledError ;
747
747
}
748
748
}
@@ -1027,7 +1027,11 @@ async function completeAsyncIteratorValue(
1027
1027
pathToArray ( itemPath ) ,
1028
1028
) ;
1029
1029
const handledError = handleFieldError ( error , itemType , errors ) ;
1030
- filterSubsequentPayloads ( exeContext , itemPath ) ;
1030
+ filterSubsequentPayloads (
1031
+ exeContext ,
1032
+ itemPath ,
1033
+ asyncPayloadRecord ,
1034
+ ) ;
1031
1035
return handledError ;
1032
1036
} ) ,
1033
1037
) ;
@@ -1037,7 +1041,7 @@ async function completeAsyncIteratorValue(
1037
1041
} catch ( rawError ) {
1038
1042
completedResults . push ( null ) ;
1039
1043
const error = locatedError ( rawError , fieldNodes , pathToArray ( itemPath ) ) ;
1040
- filterSubsequentPayloads ( exeContext , itemPath ) ;
1044
+ filterSubsequentPayloads ( exeContext , itemPath , asyncPayloadRecord ) ;
1041
1045
handleFieldError ( error , itemType , errors ) ;
1042
1046
}
1043
1047
} catch ( rawError ) {
@@ -1157,7 +1161,7 @@ function completeListValue(
1157
1161
pathToArray ( itemPath ) ,
1158
1162
) ;
1159
1163
const handledError = handleFieldError ( error , itemType , errors ) ;
1160
- filterSubsequentPayloads ( exeContext , itemPath ) ;
1164
+ filterSubsequentPayloads ( exeContext , itemPath , asyncPayloadRecord ) ;
1161
1165
return handledError ;
1162
1166
} ) ,
1163
1167
) ;
@@ -1167,7 +1171,7 @@ function completeListValue(
1167
1171
} catch ( rawError ) {
1168
1172
const error = locatedError ( rawError , fieldNodes , pathToArray ( itemPath ) ) ;
1169
1173
const handledError = handleFieldError ( error , itemType , errors ) ;
1170
- filterSubsequentPayloads ( exeContext , itemPath ) ;
1174
+ filterSubsequentPayloads ( exeContext , itemPath , asyncPayloadRecord ) ;
1171
1175
completedResults . push ( handledError ) ;
1172
1176
}
1173
1177
index ++ ;
@@ -2052,8 +2056,8 @@ async function executeStreamIterator(
2052
2056
2053
2057
function filterSubsequentPayloads (
2054
2058
exeContext : ExecutionContext ,
2055
- nullPath ? : Path ,
2056
- currentAsyncRecord ? : AsyncPayloadRecord ,
2059
+ nullPath : Path | undefined ,
2060
+ currentAsyncRecord : AsyncPayloadRecord | undefined ,
2057
2061
) : void {
2058
2062
const nullPathArray = pathToArray ( nullPath ) ;
2059
2063
exeContext . subsequentPayloads . forEach ( ( asyncRecord ) => {
0 commit comments