zapier / apollo-server-integration-testing

Test helper for writing apollo-server integration tests
MIT License
133 stars 21 forks source link

Can not run with `apollo-server@3` #19

Open heeju opened 3 years ago

heeju commented 3 years ago

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'
thmsobrmlr commented 3 years ago

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

1garo commented 3 years ago

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

thmsobrmlr commented 3 years ago

@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",
  }
1garo commented 3 years ago

I continue with the following type error:

image

adamwdennis commented 3 years ago

I'm also getting the above errors with apollo-server-express@3.4.0

ghost commented 2 years ago

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

yasharma commented 2 years ago

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