We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64067ab commit 66284abCopy full SHA for 66284ab
src/execution/execute.ts
@@ -2294,16 +2294,11 @@ async function executeStreamAsyncIteratorItem(
2294
let item;
2295
try {
2296
const iteration = await iterator.next();
2297
- if (!exeContext.streams.has(streamRecord.streamContext)) {
+ if (!exeContext.streams.has(streamRecord.streamContext) || iteration.done) {
2298
streamRecord.setIsCompletedIterator();
2299
return { done: true, value: undefined };
2300
}
2301
- const { value, done } = iteration;
2302
- if (done) {
2303
- streamRecord.setIsCompletedIterator();
2304
- return { done, value: undefined };
2305
- }
2306
- item = value;
+ item = iteration.value;
2307
} catch (rawError) {
2308
handleFieldError(
2309
rawError,
0 commit comments