Table of Contents

Method EnsureQueryData

Namespace
Velvet
Assembly
Velvet.Docs.dll

EnsureQueryData<T>(QueryOptions<T, T>, bool)

The data the entry options names holds, and otherwise the data a request for it returns, TanStack Query's ensureQueryData.

public VelvetTask<T> EnsureQueryData<T>(QueryOptions<T, T> options, bool revalidateIfStale = false)

Parameters

options QueryOptions<T, T>

As FetchQuery<T>(QueryOptions<T, T>).

revalidateIfStale bool

True also fetches an entry whose data is stale for the query's stale time, without waiting for it.

Returns

VelvetTask<T>

Type Parameters

T