diff --git a/packages/graphql-yoga/__integration-tests__/node-http.spec.ts b/packages/graphql-yoga/__integration-tests__/node-http.spec.ts index 5c24660174..96d476e247 100644 --- a/packages/graphql-yoga/__integration-tests__/node-http.spec.ts +++ b/packages/graphql-yoga/__integration-tests__/node-http.spec.ts @@ -6,7 +6,7 @@ import { createSchema, createYoga, Plugin, - useExecutionCancellation, + useExecutionCancelation, } from '../src/index.js'; describe('node-http', () => { @@ -123,7 +123,7 @@ describe('node-http', () => { } `, }), - plugins: [plugin, useExecutionCancellation()], + plugins: [plugin, useExecutionCancelation()], }); const server = createServer(yoga); await new Promise(resolve => server.listen(0, resolve)); @@ -159,7 +159,7 @@ describe('node-http', () => { let didInvokedNestedField = false; const yoga = createYoga({ - plugins: [useExecutionCancellation()], + plugins: [useExecutionCancelation()], schema: createSchema({ typeDefs: /* GraphQL */ ` type Query { diff --git a/packages/graphql-yoga/__tests__/request-cancellation.spec.ts b/packages/graphql-yoga/__tests__/request-cancellation.spec.ts index c94d7cc5f7..2e0813bc98 100644 --- a/packages/graphql-yoga/__tests__/request-cancellation.spec.ts +++ b/packages/graphql-yoga/__tests__/request-cancellation.spec.ts @@ -1,6 +1,6 @@ import { useDeferStream } from '@graphql-yoga/plugin-defer-stream'; import { createLogger, createSchema, createYoga, FetchAPI } from '../src/index'; -import { useExecutionCancellation } from '../src/plugins/use-execution-cancellation'; +import { useExecutionCancelation } from '../src/plugins/use-execution-cancelation'; const variants: Array<[name: string, fetchAPI: undefined | FetchAPI]> = [ ['Ponyfilled WhatWG Fetch', undefined], @@ -75,7 +75,7 @@ describe.each(variants)('request cancellation (%s)', (_, fetchAPI) => { schema, fetchAPI, logging: logger, - plugins: [useExecutionCancellation()], + plugins: [useExecutionCancelation()], }); const abortController = new AbortController(); const promise = Promise.resolve( @@ -145,7 +145,7 @@ describe.each(variants)('request cancellation (%s)', (_, fetchAPI) => { schema, fetchAPI, logging: logger, - plugins: [useExecutionCancellation()], + plugins: [useExecutionCancelation()], }); const abortController = new AbortController(); const response = await yoga.fetch('http://yoga/graphql', { @@ -230,7 +230,7 @@ describe.each(variants)('request cancellation (%s)', (_, fetchAPI) => { logger.debug = debugLogs; const yoga = createYoga({ schema, - plugins: [useDeferStream(), useExecutionCancellation()], + plugins: [useDeferStream(), useExecutionCancelation()], fetchAPI, logging: logger, }); diff --git a/packages/graphql-yoga/src/index.ts b/packages/graphql-yoga/src/index.ts index 3a893bd1f1..bcacaf70b1 100644 --- a/packages/graphql-yoga/src/index.ts +++ b/packages/graphql-yoga/src/index.ts @@ -38,4 +38,4 @@ export { usePayloadFormatter, } from '@envelop/core'; export { getSSEProcessor } from './plugins/result-processor/sse.js'; -export { useExecutionCancellation } from './plugins/use-execution-cancellation.js'; +export { useExecutionCancelation } from './plugins/use-execution-cancelation.js'; diff --git a/packages/graphql-yoga/src/plugins/use-execution-cancellation.ts b/packages/graphql-yoga/src/plugins/use-execution-cancelation.ts similarity index 89% rename from packages/graphql-yoga/src/plugins/use-execution-cancellation.ts rename to packages/graphql-yoga/src/plugins/use-execution-cancelation.ts index bb334ba3fc..4f45e4ee77 100644 --- a/packages/graphql-yoga/src/plugins/use-execution-cancellation.ts +++ b/packages/graphql-yoga/src/plugins/use-execution-cancelation.ts @@ -3,7 +3,7 @@ import type { Plugin } from './types'; /** * Enables experimental support for request cancelation. */ -export function useExecutionCancellation(): Plugin { +export function useExecutionCancelation(): Plugin { return { onExecute({ args }) { // @ts-expect-error we don't have this typing in envelop diff --git a/packages/plugins/defer-stream/__integration-tests__/defer-stream.spec.ts b/packages/plugins/defer-stream/__integration-tests__/defer-stream.spec.ts index 1bf155e3f6..7eaeba4bff 100644 --- a/packages/plugins/defer-stream/__integration-tests__/defer-stream.spec.ts +++ b/packages/plugins/defer-stream/__integration-tests__/defer-stream.spec.ts @@ -1,6 +1,6 @@ import { createServer, get, IncomingMessage } from 'node:http'; import { AddressInfo } from 'node:net'; -import { createLogger, createSchema, createYoga, useExecutionCancellation } from 'graphql-yoga'; +import { createLogger, createSchema, createYoga, useExecutionCancelation } from 'graphql-yoga'; import { useDeferStream } from '@graphql-yoga/plugin-defer-stream'; import { createPushPullAsyncIterable } from '../__tests__/push-pull-async-iterable.js'; @@ -141,7 +141,7 @@ it('memory/cleanup leak by source that never publishes a value', async () => { }, }, }), - plugins: [useDeferStream(), useExecutionCancellation()], + plugins: [useDeferStream(), useExecutionCancelation()], logging: logger, });