Types mismatch: ApolloServer/ApolloServerBase
See original GitHub issueFollowing the example of an integration test:
Environment
apollo-server-express@2.8.1
apollo-server-testing@2.9.2
typescript@3.5.3
The issue
The output type of new ApolloServer
is ApolloServer
, while the input type to createTestClient
is ApolloServerBase
. This makes these functions not compatible.
I’m using TypeScript, therefore I can experience this error.
Expected behavior
a) createTestClient(server: ApolloServer)
b) Change the example of creating a server instance to return expected ApolloServerBase
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7
Top Results From Across the Web
graphql - Type mismatch on variable and argument (Int / Int)
How is Int and Int Type mismatched? The first variable/argument error reoprts the same error (Int / Int) when I correctly pass 3...
Read more >Type Mismatch error but can't fathom it out... : r/androiddev
When I try to run the app - which has worked fine up until this section - I get the following error in...
Read more >Mismatch using Microsoft.SqlServer.Types - MSDN
In my VB class I import Microsoft. SqlServer. Types and that causes the problem. It wants to use Version 10 of the dll...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just had the same issue. In my case upgrading both
apollo-server
andapollo-server-testing
to 2.9.13 fixed the problem. I think the solution is just to make sure theapollo-server
, orapollo-server-express
, version is in sync withapollo-server-testing
.I confirm that updating to the following versions of packages fixed the issue for me: