New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix <ApolloProvider/> typings #1319

merged 1 commit into from Nov 6, 2017


None yet
3 participants
Copy link

Madumo commented Nov 3, 2017

This fixes the typings of ApolloProvider.

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.

Ref: #1299


This comment has been minimized.

Copy link

meteor-bot commented Nov 3, 2017

@Madumo: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here:


This comment has been minimized.

Copy link

meteor-bot commented Nov 3, 2017


There are library changes, but not tests. That's OK as long as you're refactoring existing code

Generated by 🚫 dangerJS

@Madumo Madumo force-pushed the Madumo:master branch from e96bea3 to da4ce7f Nov 3, 2017

@estaub estaub referenced this pull request Nov 6, 2017


Fix typescript interface #1312

@jbaxleyiii jbaxleyiii merged commit 3431ab6 into apollographql:master Nov 6, 2017

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
CLA Author has signed the Meteor CLA.
Danger ⚠️ Danger found some issues. Don't worry, everything is fixable.
bundlesize ./dist/index.min.js: 8.46kB < maxSize 8.6kB gzip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment