aboutsummaryrefslogtreecommitdiffstats
path: root/tests/msw/handlers/topics/topics-count.handler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/msw/handlers/topics/topics-count.handler.ts')
-rw-r--r--tests/msw/handlers/topics/topics-count.handler.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/msw/handlers/topics/topics-count.handler.ts b/tests/msw/handlers/topics/topics-count.handler.ts
index 7e3dab9..0a48d06 100644
--- a/tests/msw/handlers/topics/topics-count.handler.ts
+++ b/tests/msw/handlers/topics/topics-count.handler.ts
@@ -1,12 +1,13 @@
-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 { TopicsCountResponse } from '../../../../src/services/graphql';
import type { GraphQLPostWhere } from '../../../../src/types';
import { wpTopicsFixture } from '../../../fixtures';
import { getConnection } from '../../../utils/graphql';
+import { wordpressAPI } from '../../instances';
import { schema } from '../../schema';
-export const topicsCountHandler = graphql.query<
+export const topicsCountHandler = wordpressAPI.query<
TopicsCountResponse,
GraphQLPostWhere
>('TopicsCount', async ({ query, variables }) => {
@@ -15,7 +16,7 @@ export const topicsCountHandler = 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,