I'm trying to update cache to trigger rerender of UI but it seems that the update method on apollo mutations does not work correctly if you use async/await
update
async/await
mutation({ variables: { ... }, update: async (cache, responseFromMutation) => { ... const someFunctionResult = await someFunction() proxy.writeQuery({...}) // this writes to cache but doesn't trigger rerendering of UI. If we take out the `await` it works. } })
Any ideas?
2.1m questions
2.1m answers
60 comments
57.0k users