GithubHelp home page GithubHelp logo

Comments (3)

jbaxleyiii avatar jbaxleyiii commented on April 27, 2024

➤ Cory Deppen commented:

Rather than using the Cache type, which is defined in the TypeScript lib.dom.d.ts declaration file, for the generic parameter to ProviderProps in the ApolloProvider class, it may be more appropriate to use any to let the type flow through when the client is created. It may also be less confusing if the generic type parameter was renamed to something like TCache in the ProviderProps interface definition so it's not confused with the Cache type.

I tested this change in the ApolloProvider.d.ts file and noticed the error went away and the client was properly typed as NormalizedCache when defining the cache as InMemoryCache.

from apollo-link-state.

jbaxleyiii avatar jbaxleyiii commented on April 27, 2024

➤ Jens Ehlers commented:

@corydeppen thanks, this worked! Can you make a pull request?

from apollo-link-state.

jbaxleyiii avatar jbaxleyiii commented on April 27, 2024

➤ Jannis Pohlmann commented:

Who's in charge of deciding how this gets fixed? I'm also hitting this with

"apollo-cache-inmemory": "^1.0.0",
"apollo-client": "^2.0.1",
"apollo-link-http": "^1.1.0",
"apollo-link-state": "^0.0.4",
"graphql": "^0.11.7",
"graphql-tag": "^2.5.0",
"react-apollo": "2.0.0",

from apollo-link-state.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.