Course lesson

Evict deleted items from the Apollo cache

When deleting an item, we express our intent to completely remove all traces of it. If the mutation succeeds, that means it's gone from the backend as well. But some components external to our note list, might still be listening to our deleted item. To ensure...

Duration
4 min
Access
Pro
Transcript
Available

When deleting an item, we express our intent to completely remove all traces of it. If the mutation succeeds, that means it's gone from the backend as well. But some components external to our note list, might still be listening to our deleted item. To ensure they get the update, we can completely evict the normalised instance from the cache using the cache.evict() method.