aboutsummaryrefslogtreecommitdiffstats
path: root/tests/msw/handlers/topics/topics-slugs.handler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/msw/handlers/topics/topics-slugs.handler.ts')
-rw-r--r--tests/msw/handlers/topics/topics-slugs.handler.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/msw/handlers/topics/topics-slugs.handler.ts b/tests/msw/handlers/topics/topics-slugs.handler.ts
index 960e411..779a384 100644
--- a/tests/msw/handlers/topics/topics-slugs.handler.ts
+++ b/tests/msw/handlers/topics/topics-slugs.handler.ts
@@ -1,10 +1,11 @@
-import { type ExecutionResult, graphql as executeGraphql } from 'graphql';
-import { HttpResponse, graphql } from 'msw';
+import { type ExecutionResult, graphql } from 'graphql';
+import { HttpResponse } from 'msw';
import type { TopicsSlugsResponse } from '../../../../src/services/graphql';
import { wpTopicsFixture } from '../../../fixtures';
+import { wordpressAPI } from '../../instances';
import { schema } from '../../schema';
-export const topicsSlugsHandler = graphql.query<
+export const topicsSlugsHandler = wordpressAPI.query<
TopicsSlugsResponse,
Record<'first', number>
>('TopicsSlugs', async ({ query, variables }) => {
@@ -13,7 +14,7 @@ export const topicsSlugsHandler = graphql.query<
if (isError) return HttpResponse.json({ data: { topics: null } });
- const { data, errors } = (await executeGraphql({
+ const { data, errors } = (await graphql({
schema,
source: query,
variableValues: variables,