Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/reference/QueryClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ await queryClient.invalidateQueries(
- Per default, a currently running request will be cancelled before a new request is made
- When set to `false`, no refetch will be made if there is already a request running.

**Notes**

- Unlike [`refetchQueries`](#queryclientrefetchqueries), `invalidateQueries` marks matching queries as invalid and then refetches them according to the `refetchType` option.
- Unlike [`removeQueries`](#queryclientremovequeries), `invalidateQueries` keeps matching queries in the cache.

## `queryClient.refetchQueries`

The `refetchQueries` method can be used to refetch queries based on certain conditions.
Expand Down Expand Up @@ -395,6 +400,7 @@ This function returns a promise that will resolve when all of the queries are do

- Queries that are "disabled" because they only have disabled Observers will never be refetched.
- Queries that are "static" because they only have Observers with a Static StaleTime will never be refetched.
- Unlike [`invalidateQueries`](#queryclientinvalidatequeries), `refetchQueries` refetches matching queries without marking them as invalid first.

## `queryClient.cancelQueries`

Expand Down Expand Up @@ -434,6 +440,10 @@ queryClient.removeQueries({ queryKey, exact: true })

This method does not return anything

**Notes**

- Unlike [`invalidateQueries`](#queryclientinvalidatequeries) or [`refetchQueries`](#queryclientrefetchqueries), `removeQueries` removes matching queries from the cache instead of refetching them.

## `queryClient.resetQueries`

The `resetQueries` method can be used to reset queries in the cache to their
Expand Down
Loading