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
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?