Skip to content

[Graphcache] Equivalent to ApolloClient's writeQuery / writeFragment? #1059

Answered by JoviDeCroock
ecklf asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

GraphCache doesn't allow this with a reason, we have structured this cache to rely on the backend as a source of truth. This means that if we alter the cache outside of a mutation that we'd be straying away from our source of truth.
Doing so can lead to indeterministic behavior which is something we're aiming to avoid, this seems to indicate that the alteration you perform never exits the cache (it never updates the server-data) which results in a discrepancy for the data.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ecklf
Comment options

Answer selected by ecklf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants