apollo-cache-hermes
apollo-cache-hermes copied to clipboard
bug: `GraphSnapshot` is not exported (but should be)
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 };