TanStack
API Reference

QueryFilters

Defined in: packages/query-core/src/utils.ts:31

Filters used to select queries, for example in queryClient.getQueriesData or queryClient.invalidateQueries. All provided filters must match; filters that are left unspecified are ignored.

Extended by

Type Parameters

TQueryKey

TQueryKey extends QueryKey = QueryKey

Properties

PropertyTypeDefault valueDescription
exact?booleanundefinedMatch query key exactly
fetchStatus?"fetching" | "paused" | "idle"undefinedInclude queries matching their fetchStatus
predicate?(query: Query) => booleanundefinedInclude queries matching this predicate function
queryKey?TQueryKey | TuplePrefixes<TQueryKey>undefinedInclude queries matching this query key
stale?booleanundefinedInclude or exclude stale queries
type?QueryTypeFilter'all'Filter to active queries, inactive queries or all queries