Skip to content

Commit e68e6e8

Browse files
committed
rename fieldPath to itemPath
1 parent fda7744 commit e68e6e8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/execution/execute.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ async function completeAsyncIteratorValue(
996996
break;
997997
}
998998

999-
const fieldPath = addPath(path, index, undefined);
999+
const itemPath = addPath(path, index, undefined);
10001000
let iteration;
10011001
try {
10021002
// eslint-disable-next-line no-await-in-loop
@@ -1005,7 +1005,7 @@ async function completeAsyncIteratorValue(
10051005
break;
10061006
}
10071007
} catch (rawError) {
1008-
const error = locatedError(rawError, fieldNodes, pathToArray(fieldPath));
1008+
const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));
10091009
completedResults.push(handleFieldError(error, itemType, errors));
10101010
break;
10111011
}
@@ -1019,7 +1019,7 @@ async function completeAsyncIteratorValue(
10191019
itemType,
10201020
fieldNodes,
10211021
info,
1022-
fieldPath,
1022+
itemPath,
10231023
asyncPayloadRecord,
10241024
)
10251025
) {
@@ -1952,7 +1952,7 @@ async function executeStreamIteratorItem(
19521952
info: GraphQLResolveInfo,
19531953
itemType: GraphQLOutputType,
19541954
asyncPayloadRecord: StreamRecord,
1955-
fieldPath: Path,
1955+
itemPath: Path,
19561956
): Promise<IteratorResult<unknown>> {
19571957
let item;
19581958
try {
@@ -1963,9 +1963,9 @@ async function executeStreamIteratorItem(
19631963
}
19641964
item = value;
19651965
} catch (rawError) {
1966-
const error = locatedError(rawError, fieldNodes, pathToArray(fieldPath));
1966+
const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));
19671967
const value = handleFieldError(error, itemType, asyncPayloadRecord.errors);
1968-
filterSubsequentPayloads(exeContext, fieldPath, asyncPayloadRecord);
1968+
filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);
19691969
// don't continue if iterator throws
19701970
return { done: true, value };
19711971
}
@@ -1976,7 +1976,7 @@ async function executeStreamIteratorItem(
19761976
itemType,
19771977
fieldNodes,
19781978
info,
1979-
fieldPath,
1979+
itemPath,
19801980
item,
19811981
asyncPayloadRecord,
19821982
);
@@ -1986,22 +1986,22 @@ async function executeStreamIteratorItem(
19861986
const error = locatedError(
19871987
rawError,
19881988
fieldNodes,
1989-
pathToArray(fieldPath),
1989+
pathToArray(itemPath),
19901990
);
19911991
const handledError = handleFieldError(
19921992
error,
19931993
itemType,
19941994
asyncPayloadRecord.errors,
19951995
);
1996-
filterSubsequentPayloads(exeContext, fieldPath, asyncPayloadRecord);
1996+
filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);
19971997
return handledError;
19981998
});
19991999
}
20002000
return { done: false, value: completedItem };
20012001
} catch (rawError) {
2002-
const error = locatedError(rawError, fieldNodes, pathToArray(fieldPath));
2002+
const error = locatedError(rawError, fieldNodes, pathToArray(itemPath));
20032003
const value = handleFieldError(error, itemType, asyncPayloadRecord.errors);
2004-
filterSubsequentPayloads(exeContext, fieldPath, asyncPayloadRecord);
2004+
filterSubsequentPayloads(exeContext, itemPath, asyncPayloadRecord);
20052005
return { done: false, value };
20062006
}
20072007
}
@@ -2021,10 +2021,10 @@ async function executeStreamIterator(
20212021
let previousAsyncPayloadRecord = parentContext ?? undefined;
20222022
// eslint-disable-next-line no-constant-condition
20232023
while (true) {
2024-
const fieldPath = addPath(path, index, undefined);
2024+
const itemPath = addPath(path, index, undefined);
20252025
const asyncPayloadRecord = new StreamRecord({
20262026
label,
2027-
path: fieldPath,
2027+
path: itemPath,
20282028
parentContext: previousAsyncPayloadRecord,
20292029
iterator,
20302030
exeContext,
@@ -2037,7 +2037,7 @@ async function executeStreamIterator(
20372037
info,
20382038
itemType,
20392039
asyncPayloadRecord,
2040-
fieldPath,
2040+
itemPath,
20412041
);
20422042

20432043
asyncPayloadRecord.addItems(

0 commit comments

Comments
 (0)