question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript Error after update to apollo-server-express 2.11.0

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
marcorenicommented, May 13, 2020

FYI I had the same issue updating from apollo-server@2.13.0 to apollo-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?

apollo-server-core@^2.13.1:
  version "2.13.1"
  resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-2.13.1.tgz#eac223696ae9da5f4990273ea89c74b77af0e156"
  integrity sha512-4jKF0VbpoxprhcruaGoHG5ScrquSSkQ/LVFrOLp/ukUFuooLEMb1O18tAQdgVahkNgLkRKdNJYLLyoQoj+i3dA==
  dependencies:
    "@apollographql/apollo-tools" "^0.4.3"
    "@apollographql/graphql-playground-html" "1.6.24"
    "@types/graphql-upload" "^8.0.0"
    "@types/ws" "^7.0.0"
    apollo-cache-control "^0.10.1-alpha.0"
    apollo-datasource "^0.7.1-alpha.0"
    apollo-engine-reporting "^1.8.1-alpha.0"
    apollo-server-caching "^0.5.1"
    apollo-server-env "^2.4.4-alpha.0"
    apollo-server-errors "^2.4.1"
    apollo-server-plugin-base "^0.8.1-alpha.0"
    apollo-server-types "^0.4.1-alpha.0"
    apollo-tracing "^0.10.1-alpha.0"
    fast-json-stable-stringify "^2.0.0"
    graphql-extensions "^0.12.1-alpha.0"
    graphql-tag "^2.9.2"
    graphql-tools "^4.0.0"
    graphql-upload "^8.0.2"
    loglevel "^1.6.7"
    sha.js "^2.4.11"
    subscriptions-transport-ws "^0.9.11"
    ws "^6.0.0"
0reactions
jbrainzcommented, Jul 22, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found