Table of Contents

Class QueryFilters

Namespace
Velvet
Assembly
Velvet.Docs.dll

Selects the entries a QueryClient method works on, TanStack Query's query filters. Every property that is set must match: an entry is selected when its key matches, it is of the type asked for, its staleness and fetch status are those asked for, and the predicate accepts it.

public sealed record QueryFilters
Inheritance
object
QueryFilters

Properties

Exact

True selects only the entry whose key equals QueryKey.

FetchStatus

Selects by whether a request is in flight; null selects both.

Predicate

Accepts or declines each entry the other properties select, handed its QueryInfo.

QueryKey

The key the entries are selected by: the entries whose key it leads, or only the entry it equals under Exact. Null selects every key. See QueryKey for how a filter key matches.

Stale

True selects only stale entries and false only fresh ones, as IsStale reads them for a mounted query and as an entry with no data or an invalidated one is stale for an entry nothing reads. Null selects both.

Type

Selects by whether an enabled query reads the entry; null is All, except where a method documents another default.