You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Page 1:
Uses the useQuery function with the 'fetch-policy' of 'cache-first' to get a list of items.
For example, { id: 1, __typename: 'Item' }
Page 2:
On a seperate page I have a DeleteItem mutation with an update calling evict: await deleteItem({}, { update: (cache, { data }) => { const apollo = useApollo(); apollo.clients.default.cache.evict({ id: apollo.clients.default.cache.identify({ id: 1, __typename: 'Item' }) }); apollo.clients.default.cache.gc(); } });
Expected behaviour
Expecting to see the Item removed from cache in all instances.
Reproduction
No response
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Describe the bug
Page 1:
Uses the useQuery function with the 'fetch-policy' of 'cache-first' to get a list of items.
For example,
{ id: 1, __typename: 'Item' }
Page 2:
On a seperate page I have a DeleteItem mutation with an update calling evict:
await deleteItem({}, { update: (cache, { data }) => { const apollo = useApollo(); apollo.clients.default.cache.evict({ id: apollo.clients.default.cache.identify({ id: 1, __typename: 'Item' }) }); apollo.clients.default.cache.gc(); } });
Expected behaviour
Expecting to see the Item removed from cache in all instances.
Reproduction
No response
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: