Evicting deleted items from the Apollo cache

Hello Everyone,

I am trying a basic gql delete operation, and basically evicting the deleted item manually from the cache. I can confirm from the apollo dev tool that the said note is deleted but the UI component does not re-render. Am I missing anything?

 update: (cache, mutationResult) => {
      const deletedNoteId = cache.identify(
        mutationResult.data?.deleteNote?.note as any
      );
      cache.modify({
        fields: {
          notes: (existingNotes) => {
            return existingNotes.filter((noteRef: any) => {
              return cache.identify(noteRef) !== deletedNoteId;
            });
          },
        },
      });
      cache.evict({ id: deletedNoteId });
    },

After deletion

EDIT: Even though the cache entry updates, root_query still holds the reference to the deleted item. I must be doing something wrong?