@@ -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,7 +1976,7 @@ async function executeStreamIteratorItem(
1976
1976
itemType ,
1977
1977
fieldNodes ,
1978
1978
info ,
1979
- fieldPath ,
1979
+ itemPath ,
1980
1980
item ,
1981
1981
asyncPayloadRecord ,
1982
1982
) ;
@@ -1986,22 +1986,22 @@ async function executeStreamIteratorItem(
1986
1986
const error = locatedError (
1987
1987
rawError ,
1988
1988
fieldNodes ,
1989
- pathToArray ( fieldPath ) ,
1989
+ pathToArray ( itemPath ) ,
1990
1990
) ;
1991
1991
const handledError = handleFieldError (
1992
1992
error ,
1993
1993
itemType ,
1994
1994
asyncPayloadRecord . errors ,
1995
1995
) ;
1996
- filterSubsequentPayloads ( exeContext , fieldPath , asyncPayloadRecord ) ;
1996
+ filterSubsequentPayloads ( exeContext , itemPath , asyncPayloadRecord ) ;
1997
1997
return handledError ;
1998
1998
} ) ;
1999
1999
}
2000
2000
return { done : false , value : completedItem } ;
2001
2001
} catch ( rawError ) {
2002
- const error = locatedError ( rawError , fieldNodes , pathToArray ( fieldPath ) ) ;
2002
+ const error = locatedError ( rawError , fieldNodes , pathToArray ( itemPath ) ) ;
2003
2003
const value = handleFieldError ( error , itemType , asyncPayloadRecord . errors ) ;
2004
- filterSubsequentPayloads ( exeContext , fieldPath , asyncPayloadRecord ) ;
2004
+ filterSubsequentPayloads ( exeContext , itemPath , asyncPayloadRecord ) ;
2005
2005
return { done : false , value } ;
2006
2006
}
2007
2007
}
@@ -2021,10 +2021,10 @@ async function executeStreamIterator(
2021
2021
let previousAsyncPayloadRecord = parentContext ?? undefined ;
2022
2022
// eslint-disable-next-line no-constant-condition
2023
2023
while ( true ) {
2024
- const fieldPath = addPath ( path , index , undefined ) ;
2024
+ const itemPath = addPath ( path , index , undefined ) ;
2025
2025
const asyncPayloadRecord = new StreamRecord ( {
2026
2026
label,
2027
- path : fieldPath ,
2027
+ path : itemPath ,
2028
2028
parentContext : previousAsyncPayloadRecord ,
2029
2029
iterator,
2030
2030
exeContext,
@@ -2037,7 +2037,7 @@ async function executeStreamIterator(
2037
2037
info ,
2038
2038
itemType ,
2039
2039
asyncPayloadRecord ,
2040
- fieldPath ,
2040
+ itemPath ,
2041
2041
) ;
2042
2042
2043
2043
asyncPayloadRecord . addItems (
0 commit comments