From 164395d3c64e3618ab264e2eadf9158b3ecc0eb1 Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Wed, 15 Jan 2025 21:01:39 +0300 Subject: [PATCH] Fix check --- examples/nextjs-ws/server.js | 2 +- .../__tests__/request-cancellation.spec.ts | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/nextjs-ws/server.js b/examples/nextjs-ws/server.js index fbe6ee3db8..f27bd37727 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 94a0c5300b..ce4fc82865 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);