Table of Contents

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

filters QueryFilters

The entries to cancel; null selects every entry.

revert bool

True, 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 OnMutate can await it as v5's is awaited.