{"library":"apollo-server-integration-testing","type":"library","category":null,"description":"This package provides essential utilities for conducting true integration tests on Apollo Server instances, especially when the server's `context` option depends on mocked HTTP `Request` or `Response` objects. Unlike the now-deprecated `apollo-server-testing` package, which often resulted in `req` being undefined in the context function, `apollo-server-integration-testing` automatically provides robust mock objects, enabling comprehensive testing of server logic, including middleware and resolvers that access `req` or `res`. The package's current stable version is 3.0.0, and while it doesn't have a fixed release cadence, it generally aims to support relevant versions of `graphql` (from 0.12.0 up to 15.0.0 as per its peer dependencies) to remain compatible with various Apollo Server setups. Its key differentiator is its ability to simulate a full HTTP request/response cycle, making it suitable for integration and end-to-end testing where `ApolloServer.executeOperation` (recommended for simpler unit tests) is insufficient.","language":"javascript","status":"active","version":"3.0.0","tags":["javascript","GraphQL","Apollo","Server","Javascript","Testing","Integration Testing","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install apollo-server-integration-testing","imports":["import { createTestClient } from 'apollo-server-integration-testing';","import type { TestClient } from 'apollo-server-integration-testing';","const { query, setOptions } = createTestClient({ apolloServer });"]},{"cmd":"yarn add apollo-server-integration-testing","imports":[]},{"cmd":"pnpm add apollo-server-integration-testing","imports":[]}],"homepage":null,"github":"https://github.com/zapier/apollo-server-integration-testing","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/apollo-server-integration-testing","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/apollo-server-integration-testing/compatibility"}}