Skip to content

Commit

Permalink
gbae
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ru4l committed Mar 28, 2024
1 parent 4169e42 commit 4aeeb6c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions packages/graphql-yoga/__integration-tests__/node-http.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
createSchema,
createYoga,
Plugin,
useExecutionCancellation,
useExecutionCancelation,
} from '../src/index.js';

describe('node-http', () => {
Expand Down Expand Up @@ -123,7 +123,7 @@ describe('node-http', () => {
}
`,
}),
plugins: [plugin, useExecutionCancellation()],
plugins: [plugin, useExecutionCancelation()],
});
const server = createServer(yoga);
await new Promise<void>(resolve => server.listen(0, resolve));
Expand Down Expand Up @@ -159,7 +159,7 @@ describe('node-http', () => {

let didInvokedNestedField = false;
const yoga = createYoga({
plugins: [useExecutionCancellation()],
plugins: [useExecutionCancelation()],
schema: createSchema({
typeDefs: /* GraphQL */ `
type Query {
Expand Down
8 changes: 4 additions & 4 deletions packages/graphql-yoga/__tests__/request-cancellation.spec.ts
Original file line number Diff line number Diff line change
@@ -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],
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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', {
Expand Down Expand Up @@ -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,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-yoga/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -141,7 +141,7 @@ it('memory/cleanup leak by source that never publishes a value', async () => {
},
},
}),
plugins: [useDeferStream(), useExecutionCancellation()],
plugins: [useDeferStream(), useExecutionCancelation()],
logging: logger,
});

Expand Down

0 comments on commit 4aeeb6c

Please sign in to comment.