Skip to content

How to invalidate all entities of a given type? #3143

Answered by lsarni
affanshahid asked this question in Q&A
Discussion options

You must be logged in to vote

Here it explains https://commerce.nearform.com/open-source/urql/docs/graphcache/cache-updates/#invalidating-a-type

cacheExchange({
  updates: {
    Mutation: {
      deleteTodo(_result, args, cache, _info) {
        cache.invalidate('Todo');
      },
    },
  },
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JoviDeCroock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants