1. 12
    Manually modify the cache to remove deleted items
    5m 58s

Manually modify the cache to remove deleted items

Share this video with your friends

Send Tweet

In this lesson, we'll look at how to use the cache.modify() utility to manually reach into the Apollo cache and update cached queries. Once a mutation has finished, Apollo will invoke the callback you pass to its "update" option, with any data the mutation returned. We'll use the returned note and the cache.identify() utility to filter out the delete note reference from our notes list inside our cache.modify() invocation.