Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

[Feature] Support optional observable caching #15

Open
DanielMSchmidt opened this issue Jan 25, 2019 · 0 comments
Open

[Feature] Support optional observable caching #15

DanielMSchmidt opened this issue Jan 25, 2019 · 0 comments

Comments

@DanielMSchmidt
Copy link
Contributor

Given you have two queries resolving the same item (e.g. in an array or as a single node) in the current implementation two Observables for the same entity would be created.
Ideally, we would only resubscribe to an observable we already have.

For this we would need to have a similar interfaceas Relay, having a node fulfil the interface of having a unique identifier. If this interface is fulfilled we can enable caching, otherwise we do it as before. We should also have an option to globally disable this kind of caching.

I would like to export sth like this

export const CacheableSchema = `
interface Cacheable {
  id: ID!
} 
`;
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant