Invalidates queries in the cache that have a key matching any of the specified queryKeys.
queryKeys
invalidateQueries({ queryKeys: [ ['get-list', 'path'], ['get-one', 'path', '1'], ],}); Copy
invalidateQueries({ queryKeys: [ ['get-list', 'path'], ['get-one', 'path', '1'], ],});
An array of arrays of keys for which the corresponding queries should be invalidated.
Invalidates queries in the cache that have a key matching any of the specified
queryKeys
.Example