apollo-server-integration-testing icon indicating copy to clipboard operation
apollo-server-integration-testing copied to clipboard

Can not run with `apollo-server@3`

Open heeju opened this issue 3 years ago • 7 comments

I upgraded apollo-server-express to 3.0.2 then, I ran test with apollo-server-integration-testing and got the error.

error TS2740: Type 'ApolloServer<ExpressContext>' is missing the following properties from type 'ApolloServer': supportsSubscriptions, supportsUploads, setGraphQLPath, willStart, and 2 more.

    14       apolloServer
             ~~~~~~~~~~~~

      node_modules/apollo-server-integration-testing/dist/index.d.ts:9:5
        9     apolloServer: ApolloServer;
              ~~~~~~~~~~~~
        The expected type comes from property 'apolloServer' which is declared here on type 'TestClientConfig'

heeju avatar Jul 27 '21 08:07 heeju

Can you try my pull request https://github.com/zapier/apollo-server-integration-testing/pull/20 and provide feedback?

thmsobrmlr avatar Aug 04 '21 22:08 thmsobrmlr

Being having the same problem. @thomas88 if you guide me on how to point the version of the lib to yours I can test, it has being a block for a week now

1garo avatar Nov 12 '21 15:11 1garo

@1garo As end user I think the most simple solution is to add the following in package.json:

  "resolutions": {
    "apollo-server-express": "3.1.2",
  }

thmsobrmlr avatar Nov 12 '21 15:11 thmsobrmlr

I continue with the following type error:

image

1garo avatar Nov 12 '21 15:11 1garo

I'm also getting the above errors with [email protected]

adamwdennis avatar Nov 17 '21 13:11 adamwdennis

Yeah I'm getting this too, any idea when the fix will come as it's blocking us from upgrading?

ghost avatar Feb 08 '22 05:02 ghost

i was facing the same issue and fixed by following this https://github.com/zapier/apollo-server-integration-testing/pull/20#issuecomment-1004245811

yasharma avatar Mar 02 '22 09:03 yasharma