Features
- Adds
graphql.link
request handler that allows to mock GraphQL operations on per-endpoint basis (#315, #319).
import { setupWorker, graphql } from 'msw'
const github = graphql.link('https://api.github.com/graphql')
const stripe = graphql.link('https://api.stripe.com/graphql')
const worker = setupWorker(
github.query('GetUser', resolver),
stripe.mutation('Payment', resolver),
)
worker.start()
Bug fixes
ERROR in node_modules/msw/lib/types/context/cookie.d.ts:1:8 - error TS1192:
Module '"/node_modules/@types/cookie/index"' has no default export.