diff options
Diffstat (limited to 'tests/msw/handlers/topics/topic.handler.ts')
| -rw-r--r-- | tests/msw/handlers/topics/topic.handler.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/msw/handlers/topics/topic.handler.ts b/tests/msw/handlers/topics/topic.handler.ts index 5df00ea..1cb565b 100644 --- a/tests/msw/handlers/topics/topic.handler.ts +++ b/tests/msw/handlers/topics/topic.handler.ts @@ -1,14 +1,15 @@ -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 { TopicResponse } from '../../../../src/services/graphql'; import { wpTopicsFixture } from '../../../fixtures'; +import { wordpressAPI } from '../../instances'; import { schema } from '../../schema'; -export const topicHandler = graphql.query< +export const topicHandler = wordpressAPI.query< TopicResponse, Record<'slug', string> >('Topic', async ({ query, variables }) => { - const { data, errors } = (await executeGraphql({ + const { data, errors } = (await graphql({ schema, source: query, variableValues: variables, |
