diff --git a/examples/nextjs-ws/server.js b/examples/nextjs-ws/server.js index fbe6ee3db..f27bd3772 100644 --- a/examples/nextjs-ws/server.js +++ b/examples/nextjs-ws/server.js @@ -3,7 +3,7 @@ const { createServer } = require('node:http'); const { WebSocketServer } = require('ws'); const { createYoga, createSchema } = require('graphql-yoga'); -const { useServer } = require('graphql-ws/use/ws'); +const { useServer } = require('graphql-ws/dist/use/ws.cjs'); const { parse } = require('node:url'); const next = require('next'); const { setTimeout: setTimeout$ } = require('node:timers/promises'); diff --git a/packages/graphql-yoga/__tests__/request-cancellation.spec.ts b/packages/graphql-yoga/__tests__/request-cancellation.spec.ts index 94a0c5300..ce4fc8286 100644 --- a/packages/graphql-yoga/__tests__/request-cancellation.spec.ts +++ b/packages/graphql-yoga/__tests__/request-cancellation.spec.ts @@ -4,16 +4,15 @@ import { createDeferredPromise, fakePromise } from '@whatwg-node/server'; import { createLogger, createSchema, createYoga, FetchAPI } from '../src/index'; import { useExecutionCancellation } from '../src/plugins/use-execution-cancellation'; -const variants: Array<[name: string, fetchAPI: undefined | FetchAPI]> = [['Ponyfill', undefined]]; - -if (!process.env['LEAK_TESTS']) { - variants.push([ +const variants: Array<[name: string, fetchAPI: undefined | FetchAPI]> = [ + ['Ponyfill', undefined], + [ 'Native', // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - URLPattern is not available in types globalThis, - ]); -} + ] +]; function waitAFewMillisecondsToMakeSureGraphQLExecutionIsNotResumingInBackground() { return setTimeout$(5);