From f6455a96afc0a26a77740352ed31d8b638fc73e3 Mon Sep 17 00:00:00 2001 From: Dominic Saadi Date: Tue, 24 Jan 2023 20:55:05 -0800 Subject: [PATCH] replace SetupWorkerApi with SetupWorker --- packages/testing/src/web/mockRequests.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/testing/src/web/mockRequests.ts b/packages/testing/src/web/mockRequests.ts index 4c78b4f2f144..b27c3c19204d 100644 --- a/packages/testing/src/web/mockRequests.ts +++ b/packages/testing/src/web/mockRequests.ts @@ -9,15 +9,17 @@ import type { GraphQLContext, GraphQLRequest, ResponseTransformer, - SetupWorkerApi, + MockedResponse, + SetupWorker, ResponseComposition, + DefaultBodyType, } from 'msw' // Allow users to call "mockGraphQLQuery" and "mockGraphQLMutation" // before the server has started. We store the request handlers in // a queue that is drained once the server is started. let REQUEST_HANDLER_QUEUE: RequestHandler[] = [] -let SERVER_INSTANCE: SetupWorkerApi | any +let SERVER_INSTANCE: SetupWorker | any /** * Plugs fetch for the correct target in order to capture requests. @@ -86,7 +88,7 @@ export type DataFunction< ) => Query | void // These should get exported from MSW -type ResponseFunction = ( +type ResponseFunction = ( ...transformers: ResponseTransformer[] ) => MockedResponse