Invalidates queries in the cache that have a key matching any of the specified queryKeys.

invalidateQueries({
queryKeys: [
['get-list', 'path'],
['get-one', 'path', '1'],
],
});
  • Parameters

    • params: {
          queryKeys: any[][];
      }
      • queryKeys: any[][]

        An array of arrays of keys for which the corresponding queries should be invalidated.

    Returns void

    • This function does not return a value.