Using apollo-server & apollo-server-testing 2.22.2
Following documentation to setup an integration test here https://www.apollographql.com/docs/apollo-server/testing/testing/
I get the error when I run jest:
TypeError: Cannot read property 'bind' of undefined
104 | });
105 | // console.log(server);
> 106 | const { query } = createTestClient(server);
| ^
107 |
108 | const res = await query({
109 | query: GET_ROUTES
at createTestClient (node_modules/apollo-server-testing/src/createTestClient.ts:31:52)
at Object.<anonymous> (spec/routesResolver.spec.js:106:27)
Looking at the referenced source code, it is attempting to bind a function named executeOperation. Apparently this doesn't exist?
export default (server: ApolloServerBase): ApolloServerTestClient => {
const executeOperation = server.executeOperation.bind(server);
Is there some mismatch between the testing library and the server?
Using apollo-server & apollo-server-testing 2.22.2
Following documentation to setup an integration test here https://www.apollographql.com/docs/apollo-server/testing/testing/
I get the error when I run jest:
Looking at the referenced source code, it is attempting to bind a function named executeOperation. Apparently this doesn't exist?
Is there some mismatch between the testing library and the server?