JSPM

apollo-server-testing

2.25.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 47594
  • Score
    100M100P100Q149900F
  • License MIT

Test utils for apollo-server

Package Exports

  • apollo-server-testing

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (apollo-server-testing) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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:

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:

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

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