graphql-query-test-mock

JSON →
library 0.12.1 ·javascript
verified Jun 7, 2026

A library to mock GraphQL queries when testing clients making calls to GraphQL APIs. Ideal for use with Jest and Relay Modern/Apollo, but not bound to any specific client library. Focus is on realistic testing using nock to intercept HTTP requests. Current stable version: 0.12.1. Release cadence is irregular. Key differentiators: variable matching to verify correctness, control over query resolution timing for loading states, ability to simulate HTTP error statuses, and support for sequences of responses for pagination scenarios.