Method CancelQueries
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
CancelQueries(QueryFilters?, bool)
Cancels the requests of the entries filters selects, TanStack Query's
cancelQueries. The token a cancelled query function received is cancelled, and a task a
caller awaits for the request, such as FetchQuery<T>(QueryOptions<T, T>)'s, is cancelled with it.
public VelvetTask CancelQueries(QueryFilters? filters = null, bool revert = true)
Parameters
filtersQueryFiltersThe entries to cancel; null selects every entry.
revertboolTrue, the default, puts each entry back as it stood before the request; false leaves it in Error with the cancellation as its error, keeping its data.
Returns
- VelvetTask
A completed task, so that an
OnMutatecan await it as v5's is awaited.