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
- Per default, a currently running request will be cancelled before a new request is made
353
353
- When set to `false`, no refetch will be made if there is already a request running.
354
354
355
+
**Notes**
356
+
357
+
- Unlike [`refetchQueries`](#queryclientrefetchqueries), `invalidateQueries` marks matching queries as invalid and then refetches them according to the `refetchType` option.
358
+
- Unlike [`removeQueries`](#queryclientremovequeries), `invalidateQueries` keeps matching queries in the cache.
359
+
355
360
## `queryClient.refetchQueries`
356
361
357
362
The `refetchQueries` method can be used to refetch queries based on certain conditions.
@@ -395,6 +400,7 @@ This function returns a promise that will resolve when all of the queries are do
395
400
396
401
- Queries that are "disabled" because they only have disabled Observers will never be refetched.
397
402
- Queries that are "static" because they only have Observers with a Static StaleTime will never be refetched.
403
+
- Unlike [`invalidateQueries`](#queryclientinvalidatequeries), `refetchQueries` refetches matching queries without marking them as invalid first.
- Unlike [`invalidateQueries`](#queryclientinvalidatequeries) or [`refetchQueries`](#queryclientrefetchqueries), `removeQueries` removes matching queries from the cache instead of refetching them.
446
+
437
447
## `queryClient.resetQueries`
438
448
439
449
The `resetQueries` method can be used to reset queries in the cache to their
0 commit comments