@@ -996,7 +996,7 @@ async function completeAsyncIteratorValue(
996
996
break ;
997
997
}
998
998
999
- const fieldPath = addPath ( path , index , undefined ) ;
999
+ const itemPath = addPath ( path , index , undefined ) ;
1000
1000
let iteration ;
1001
1001
try {
1002
1002
// eslint-disable-next-line no-await-in-loop
@@ -1005,7 +1005,7 @@ async function completeAsyncIteratorValue(
1005
1005
break ;
1006
1006
}
1007
1007
} catch ( rawError ) {
1008
- const error = locatedError ( rawError , fieldNodes , pathToArray ( fieldPath ) ) ;
1008
+ const error = locatedError ( rawError , fieldNodes , pathToArray ( itemPath ) ) ;
1009
1009
completedResults . push ( handleFieldError ( error , itemType , errors ) ) ;
1010
1010
break ;
1011
1011
}
@@ -1019,7 +1019,7 @@ async function completeAsyncIteratorValue(
1019
1019
itemType ,
1020
1020
fieldNodes ,
1021
1021
info ,
1022
- fieldPath ,
1022
+ itemPath ,
1023
1023
asyncPayloadRecord ,
1024
1024
)
1025
1025
) {
@@ -1952,7 +1952,7 @@ async function executeStreamIteratorItem(
1952
1952
info : GraphQLResolveInfo ,
1953
1953
itemType : GraphQLOutputType ,
1954
1954
asyncPayloadRecord : StreamRecord ,
1955
- fieldPath : Path ,
1955
+ itemPath : Path ,
1956
1956
) : Promise < IteratorResult < unknown > > {
1957
1957
let item ;
1958
1958
try {
@@ -1963,9 +1963,9 @@ async function executeStreamIteratorItem(
1963
1963
}
1964
1964
item = value ;
1965
1965
} catch ( rawError ) {
1966
- const error = locatedError ( rawError , fieldNodes , pathToArray ( fieldPath ) ) ;
1966
+ const error = locatedError ( rawError , fieldNodes , pathToArray ( itemPath ) ) ;
1967
1967
const value = handleFieldError ( error , itemType , asyncPayloadRecord . errors ) ;
1968
- filterSubsequentPayloads ( exeContext , fieldPath , asyncPayloadRecord ) ;
1968
+ filterSubsequentPayloads ( exeContext , itemPath , asyncPayloadRecord ) ;
1969
1969
// don't continue if iterator throws
1970
1970
return { done : true , value } ;
1971
1971
}
@@ -1976,32 +1976,28 @@ async function executeStreamIteratorItem(
1976
1976
itemType ,
1977
1977
fieldNodes ,
1978
1978
info ,
1979
- fieldPath ,
1979
+ itemPath ,
1980
1980
item ,
1981
1981
asyncPayloadRecord ,
1982
1982
) ;
1983
1983
1984
1984
if ( isPromise ( completedItem ) ) {
1985
1985
completedItem = completedItem . then ( undefined , ( rawError ) => {
1986
- const error = locatedError (
1987
- rawError ,
1988
- fieldNodes ,
1989
- pathToArray ( fieldPath ) ,
1990
- ) ;
1986
+ const error = locatedError ( rawError , fieldNodes , pathToArray ( itemPath ) ) ;
1991
1987
const handledError = handleFieldError (
1992
1988
error ,
1993
1989
itemType ,
1994
1990
asyncPayloadRecord . errors ,
1995
1991
) ;
1996
- filterSubsequentPayloads ( exeContext , fieldPath , asyncPayloadRecord ) ;
1992
+ filterSubsequentPayloads ( exeContext , itemPath , asyncPayloadRecord ) ;
1997
1993
return handledError ;
1998
1994
} ) ;
1999
1995
}
2000
1996
return { done : false , value : completedItem } ;
2001
1997
} catch ( rawError ) {
2002
- const error = locatedError ( rawError , fieldNodes , pathToArray ( fieldPath ) ) ;
1998
+ const error = locatedError ( rawError , fieldNodes , pathToArray ( itemPath ) ) ;
2003
1999
const value = handleFieldError ( error , itemType , asyncPayloadRecord . errors ) ;
2004
- filterSubsequentPayloads ( exeContext , fieldPath , asyncPayloadRecord ) ;
2000
+ filterSubsequentPayloads ( exeContext , itemPath , asyncPayloadRecord ) ;
2005
2001
return { done : false , value } ;
2006
2002
}
2007
2003
}
@@ -2021,10 +2017,10 @@ async function executeStreamIterator(
2021
2017
let previousAsyncPayloadRecord = parentContext ?? undefined ;
2022
2018
// eslint-disable-next-line no-constant-condition
2023
2019
while ( true ) {
2024
- const fieldPath = addPath ( path , index , undefined ) ;
2020
+ const itemPath = addPath ( path , index , undefined ) ;
2025
2021
const asyncPayloadRecord = new StreamRecord ( {
2026
2022
label,
2027
- path : fieldPath ,
2023
+ path : itemPath ,
2028
2024
parentContext : previousAsyncPayloadRecord ,
2029
2025
iterator,
2030
2026
exeContext,
@@ -2037,7 +2033,7 @@ async function executeStreamIterator(
2037
2033
info ,
2038
2034
itemType ,
2039
2035
asyncPayloadRecord ,
2040
- fieldPath ,
2036
+ itemPath ,
2041
2037
) ;
2042
2038
2043
2039
asyncPayloadRecord . addItems (
0 commit comments