Skip to content

Commit d71caff

Browse files
committed
f
1 parent 922add0 commit d71caff

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/execution/Executor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ export class Executor<
256256
} else {
257257
this.sharedExecutionContext = sharedExecutionContext;
258258
}
259-
const { getAbortSignal, getAsyncHelpers, getRegisterCleanup, promiseAll } =
259+
const { getAbortSignal, getAsyncHelpers, getTrackPromise, promiseAll } =
260260
this.sharedExecutionContext;
261261
this.getAbortSignal = getAbortSignal;
262262
this.getAsyncHelpers = getAsyncHelpers;
263-
this.trackPromise = getRegisterCleanup();
263+
this.trackPromise = getTrackPromise();
264264
this.promiseAll = promiseAll;
265265
}
266266

src/execution/createSharedExecutionContext.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface SharedExecutionContext {
1212
values: ReadonlyArray<PromiseOrValue<T>>,
1313
) => Promise<Array<T>>;
1414
getAsyncHelpers: () => GraphQLResolveInfoHelpers;
15-
getRegisterCleanup: () => (cleanup: Promise<unknown>) => void;
15+
getTrackPromise: () => (cleanup: Promise<unknown>) => void;
1616
}
1717

1818
export function createSharedExecutionContext(
@@ -28,7 +28,7 @@ export function createSharedExecutionContext(
2828
| (<T>(values: ReadonlyArray<PromiseOrValue<T>>) => Promise<T>)
2929
| undefined;
3030

31-
const getRegisterCleanup = (): ((cleanup: Promise<unknown>) => void) =>
31+
const getTrackPromise = (): ((cleanup: Promise<unknown>) => void) =>
3232
(trackPromise ??= (cleanup) => {
3333
asyncWorkTracker.add(cleanup);
3434
});
@@ -70,14 +70,14 @@ export function createSharedExecutionContext(
7070
get promiseRace() {
7171
return getPromiseRace();
7272
},
73-
trackPromise: getRegisterCleanup(),
73+
trackPromise: getTrackPromise(),
7474
});
7575

7676
return {
7777
asyncWorkTracker,
7878
getAbortSignal: () => abortSignal,
7979
promiseAll,
8080
getAsyncHelpers,
81-
getRegisterCleanup,
81+
getTrackPromise,
8282
};
8383
}

src/execution/incremental/IncrementalExecutor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ export class IncrementalExecutor<
735735
abortStreamItem(reason);
736736
}
737737
if (isAsync) {
738-
this.sharedExecutionContext.getRegisterCleanup()(
738+
this.sharedExecutionContext.getTrackPromise()(
739739
returnIteratorCatchingErrors(
740740
iterator as AsyncIterator<unknown>,
741741
),

0 commit comments

Comments
 (0)