Manually update Apollo Graphql Cache
Usually you structure your graphql queries and mutations in a way that the cache just works out of the box. But there are times that you need to manually update the graphql cache then you can call updateQuery
:
Note that the return
is optional, so if your update function returns undefined
then it will keep the cache intact, without updating anything.