Typescript Error after update to apollo-server-express 2.11.0
See original GitHub issueI update apollo-server-express package from 2.10.1 to 2.11.0 and during the build process of the application I get the following Typescript error message:
node_modules/@apollo/gateway/node_modules/apollo-cache-control/dist/index.d.ts:24:9 - error TS2717: Subsequent property declarations must have the same type. Property 'cacheControl' must be of type '{ setCacheHint: (hint: CacheHint) => void; cacheHint: CacheHint; }', but here has type '{ setCacheHint: (hint: CacheHint) => void; cacheHint: CacheHint; }'.
24 cacheControl: {
~~~~~~~~~~~~
node_modules/apollo-cache-control/dist/index.d.ts:24:9
24 cacheControl: {
~~~~~~~~~~~~
'cacheControl' was also declared here.
When I return back to version 2.10.1, everything is ok.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:19 (5 by maintainers)
Top Results From Across the Web
Error handling - Apollo GraphQL Docs
For example, it throws a GRAPHQL_VALIDATION_FAILED error whenever an incoming operation isn't valid against the server's schema. Your resolvers can also throw ......
Read more >Integrate TypeScript with GraphQL using TypeGraphQL
Build an API to integrate TypeScript with GraphQL using the TypeGraphQL library, which simplifies creating GraphQL APIs in Node.js.
Read more >Dependencies | apollo-server-express | npm
arrow_right @apollographql/graphql‑playground‑html. 1.6.27 Notes
Version 1.6.27 Published February 24, 2021
arrow_right @types/accepts. 1.3.5 Notes
Version 1.3.5 Published February 13, 2018
Read more >apollo-server-core - UNPKG
97, new GraphQLError(. 98, 'GraphQL introspection is not allowed by Apollo Server, but the query contained __schema or __type. To enable introspection ...
Read more >Handling File Uploads with Apollo Server 2.0.
A comprehensive guide on how to upload files with Apollo-server 2.0 and Mongodb. ... Prer... Tagged with graphql, node, apolloserver, ...
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 FreeTop 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
Top GitHub Comments
FYI I had the same issue updating from
apollo-server@2.13.0
toapollo-server@2.13.1
.Fixed by installing
apollo-cache-control@^0.10.1-alpha.0
.@abernix Is it correct that apollo-server-core 2.13.1 references a lot of alpha dependencies?
Thanks, i was able to fix this from https://github.com/apollographql/apollo-server/issues/3339#issuecomment-881750194