Skip to content

Commit 85e545c

Browse files
authored
polish(execution): remove obsolete abort async checks (#4675)
Zombie code after #4657 made this.abort always sync.
1 parent 3dd146d commit 85e545c

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

src/execution/ExecutorThrowingOnIncremental.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { invariant } from '../jsutils/invariant.js';
2-
import { isPromise } from '../jsutils/isPromise.js';
32
import type { ObjMap } from '../jsutils/ObjMap.js';
43
import type { Path } from '../jsutils/Path.js';
54
import type { PromiseOrValue } from '../jsutils/PromiseOrValue.js';
@@ -39,8 +38,7 @@ export class ExecutorThrowingOnIncremental extends Executor {
3938
'`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
4039
);
4140
const reason = new Error(UNEXPECTED_MULTIPLE_PAYLOADS);
42-
const aborted = this.abort(reason);
43-
invariant(!isPromise(aborted));
41+
this.abort(reason);
4442
throw reason;
4543
}
4644
return this.executeRootGroupedFieldSet(
@@ -66,8 +64,7 @@ export class ExecutorThrowingOnIncremental extends Executor {
6664
'`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
6765
);
6866
const reason = new Error(UNEXPECTED_MULTIPLE_PAYLOADS);
69-
const aborted = this.abort(reason);
70-
invariant(!isPromise(aborted));
67+
this.abort(reason);
7168
throw reason;
7269
}
7370

@@ -101,8 +98,7 @@ export class ExecutorThrowingOnIncremental extends Executor {
10198
);
10299

103100
const reason = new Error(UNEXPECTED_MULTIPLE_PAYLOADS);
104-
const aborted = this.abort(reason);
105-
invariant(!isPromise(aborted));
101+
this.abort(reason);
106102
throw reason;
107103
}
108104

0 commit comments

Comments
 (0)