# apollo-server-testing

> Test utils for apollo-server

Latest version **2.25.3** (published 2021-11-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install apollo-server-testing
pnpm add apollo-server-testing
yarn add apollo-server-testing
bun add apollo-server-testing
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.25.3 |
| Published | 2021-11-04 |
| First published | 2018-11-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 1 |
| Unpacked size | 287.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13956 |
| Author | Apollo |
| Maintainers | apollo-bot |
| Keywords | GraphQL, Apollo, Server, Javascript |

## Links

- npm: https://www.npmjs.com/package/apollo-server-testing
- Repository: https://github.com/apollographql/apollo-server
- Homepage: https://github.com/apollographql/apollo-server#readme
- Issues: https://github.com/apollographql/apollo-server/issues
- npm.io page: https://npm.io/package/apollo-server-testing

## Dependencies (1)

- [apollo-server-core](https://npm.io/package/apollo-server-core.md) ^2.25.3

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 2.25.3 (latest) — 2021-11-04
- 2.26.2 (v2) — 2023-08-30
- 2.25.0-alpha.1 (alpha) — 2021-05-27
- 3.0.0-html.2 (html) — 2021-05-25
- 3.0.0-lambda.0 (alphalambda) — 2021-05-13
- 2.23.1-unified2.3 (unified) — 2021-04-27
- 2.19.0-alpha.0 (next) — 2020-10-05
- 2.18.0-rc.1 (rc) — 2020-09-21
- 3.0.0-alpha.3 (next-v3) — 2020-08-12
- 2.26.1 — 2022-10-20
- 2.26.0 — 2022-08-18
- 2.25.4 — 2022-05-25
- 2.25.2 — 2021-06-22
- 2.25.1 — 2021-06-08
- 2.25.0 — 2021-05-27
- … 182 more at https://npm.io/package/apollo-server-testing/versions

## README

# apollo-server-testing

This deprecated package contains a function `createTestClient` which is a very thin wrapper around the Apollo Server `server.executeOperation` method.

Code that uses this package looks like the following, where `server` is an `ApolloServer`:

```js
const { createTestClient } = require('apollo-server-testing');

const { query, mutate } = createTestClient(server);

await query({ query: QUERY });
await mutate({ mutation: MUTATION });
```

We recommend you stop using this package and replace the above code with the equivalent:

```js
await server.executeOperation({ query: QUERY });
await server.executeOperation({ query: MUTATION });
```

This package will not be distributed as part of Apollo Server 3.

---
_Source: https://npm.io/package/apollo-server-testing · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
