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?
1.4m articles
1.4m replys
5 comments
57.0k users