MCPcopy
hub / github.com/graphql/graphql-js / throw

Function throw

src/execution/__tests__/mapAsyncIterable-test.ts:265–274  ·  view source on GitHub ↗
(reason?: unknown)

Source from the content-addressed store, hash-verified

263 return Promise.resolve({ value: 1, done: false });
264 },
265 async throw(reason?: unknown) {
266 if (storedReason === undefined) {
267 await resolveOnNextTick();
268 // eslint-disable-next-line require-atomic-updates
269 storedReason = reason;
270 return { value: undefined, done: true };
271 }
272 // eslint-disable-next-line @typescript-eslint/only-throw-error
273 throw storedReason;
274 },
275 return() {
276 return Promise.resolve({ value: undefined, done: true });
277 },

Callers

nothing calls this directly

Calls 1

resolveOnNextTickFunction · 0.90

Tested by

no test coverage detected