{"library":"mock-apollo-client","type":"library","category":null,"description":"Mock Apollo Client is a utility library designed to simplify unit testing of React components that interact with GraphQL APIs via `@apollo/client`. The current stable version is 2.x, which is compatible with `@apollo/client` v4.x. Previous major versions (1.x for Apollo Client v3, and 0.x for Apollo Client v2) exist for backward compatibility. The library helps address limitations found in Apollo Client's built-in `MockedProvider`, such as the inability to assert query/mutation variables, track call counts, dynamically change results after initialization, or easily control loading states. It offers a standalone, framework-agnostic mocking solution that provides granular control over GraphQL operations within tests, making it a powerful alternative for scenarios requiring more advanced testing capabilities than `MockedProvider` offers. Release cadence is tied to major `@apollo/client` updates.","language":"javascript","status":"active","version":"2.0.0","tags":["javascript","apollo-client","graphql","mock","test","testing","typescript"],"install":[{"cmd":"npm install mock-apollo-client","imports":["import { createMockClient } from 'mock-apollo-client';","import type { ApolloClient } from '@apollo/client';\nimport { createMockClient } from 'mock-apollo-client';","mockClient.setRequestHandler(GET_DOG_QUERY, () => { /* ... */ });"]},{"cmd":"yarn add mock-apollo-client","imports":[]},{"cmd":"pnpm add mock-apollo-client","imports":[]}],"homepage":null,"github":"https://github.com/mike-gibson/mock-apollo-client","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/mock-apollo-client","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/mock-apollo-client/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Mon Jul 20","install_tag":null}}