Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/execution/ExecutorThrowingOnIncremental.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { invariant } from '../jsutils/invariant.js';
import { isPromise } from '../jsutils/isPromise.js';
import type { ObjMap } from '../jsutils/ObjMap.js';
import type { Path } from '../jsutils/Path.js';
import type { PromiseOrValue } from '../jsutils/PromiseOrValue.js';
Expand Down Expand Up @@ -39,8 +38,7 @@ export class ExecutorThrowingOnIncremental extends Executor {
'`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
);
const reason = new Error(UNEXPECTED_MULTIPLE_PAYLOADS);
const aborted = this.abort(reason);
invariant(!isPromise(aborted));
this.abort(reason);
throw reason;
}
return this.executeRootGroupedFieldSet(
Expand All @@ -66,8 +64,7 @@ export class ExecutorThrowingOnIncremental extends Executor {
'`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
);
const reason = new Error(UNEXPECTED_MULTIPLE_PAYLOADS);
const aborted = this.abort(reason);
invariant(!isPromise(aborted));
this.abort(reason);
throw reason;
}

Expand Down Expand Up @@ -101,8 +98,7 @@ export class ExecutorThrowingOnIncremental extends Executor {
);

const reason = new Error(UNEXPECTED_MULTIPLE_PAYLOADS);
const aborted = this.abort(reason);
invariant(!isPromise(aborted));
this.abort(reason);
throw reason;
}

Expand Down
Loading