···11+---
22+'@urql/exchange-graphcache': patch
33+---
44+55+Fix `invalidate` not applying when using a string to invalidate an entity
+8-1
exchanges/graphcache/src/store/store.test.ts
···856856 });
857857858858 describe('Invalidating an entity', () => {
859859- it('removes an entity from a list.', () => {
859859+ it('removes an entity from a list by object-key.', () => {
860860 InMemoryData.initDataState('write', store.data, null);
861861 store.invalidate(todosData.todos[1]);
862862+ const { data } = query(store, { query: Todos });
863863+ expect(data).toBe(null);
864864+ });
865865+866866+ it('removes an entity from a list by string-key.', () => {
867867+ InMemoryData.initDataState('write', store.data, null);
868868+ store.invalidate(store.keyOfEntity(todosData.todos[1]));
862869 const { data } = query(store, { query: Todos });
863870 expect(data).toBe(null);
864871 });