Resolve GraphQL Requests Against a Mock Schema in MSW

Share this video with your friends

Send Tweet

Operation-based GraphQL mocking allows you to move fast without investing time into schemas or resolvers.

But, when integrating Mock Service Worker into an existing application, going schema-first can be advantageous. Here's how you can route every GraphQL request to be resolved against a GraphQL schema, mocked or real, and use mock resolvers to control individual types and fields.