Skip to content

Optimistic updates not updating cache as expected #1645

Answered by kitten
01jonathanf asked this question in Q&A
Discussion options

You must be logged in to vote

Most of the time this is because your optimistic configuration there is missing some data and a subsequent query then experiences a cache miss that can only be resolved once the mutation completes. Internally it'll basically try to fetch data from the API, but will then be forced to wait until the mutation completes. We currently don't have a warning for this because it's a little tricky to detect automatically.

But if you look at the urql devtools you should actually see the cache miss come up.

To me it's actually looking like active_mnemonic is missing a __typename property. That being said, it can have various causes depending on what fields your queries will need to have available.

Yo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kitten
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