Skip to content
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

bug: GraphSnapshot is not exported (but should be) #423

Open
jorroll opened this issue Jul 25, 2019 · 0 comments
Open

bug: GraphSnapshot is not exported (but should be) #423

jorroll opened this issue Jul 25, 2019 · 0 comments

Comments

@jorroll
Copy link

jorroll commented Jul 25, 2019

Summary: ApolloClient is a generic class which expects a TCacheShape type argument. When using Hermes, that cache shape type (appears to be) GraphSnapshot.

Expected Behavior: GraphSnapshot should be exported so that end users can use it where required/expected by Apollo classes / tools.

Actual Behavior: GraphSnapshot is not exported.

Example code which does not currently work:

const link = new WebSocketLink(
  new SubscriptionClient(WS_URI, {
    reconnect: true,
  }),
);

const cache = new Hermes({ addTypename: true });

// ERROR! `GraphSnapshot` is not exported!
const options: ApolloClientOptions<GraphSnapshot> = { link, cache };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant