Defined in: packages/query-core/src/types.ts:892
The filters of queryClient.invalidateQueries: the QueryFilters that select the queries to invalidate, plus refetchType to choose which of them are refetched.
TQueryKey extends QueryKey = QueryKey
| Property | Type | Default value | Description |
|---|---|---|---|
| exact? | boolean | undefined | Match query key exactly |
| fetchStatus? | "fetching" | "paused" | "idle" | undefined | Include queries matching their fetchStatus |
| predicate? | (query: Query) => boolean | undefined | Include queries matching this predicate function |
| queryKey? | TQueryKey | TuplePrefixes<TQueryKey> | undefined | Include queries matching this query key |
| refetchType? | QueryTypeFilter | "none" | 'active' | Controls which of the matched (now-invalidated) queries are refetched in the background. - 'active': only queries with at least one active observer are refetched. - 'inactive': only queries with no active observer are refetched. - 'all': every matched query is refetched, active or not. - 'none': no query is refetched; matched queries are only marked as invalidated. |
| stale? | boolean | undefined | Include or exclude stale queries |
| type? | QueryTypeFilter | 'all' | Filter to active queries, inactive queries or all queries |