Property QueryFn
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
QueryFn
Fetches the entry's data. The token is cancelled when a refetch starts over this
request, when Clear() removes the entry, and when the last query reading the
entry leaves while the request is in flight, which also puts the entry back as it stood before the
request started: TanStack Query aborts the request of a query function that read its signal in
the same case. A function taking the token counts as having read it. The constructor taking a function
without a token is the one whose request runs on after the last reader leaves, as TanStack Query's does
for a function that never reads its signal.
public Func<CancellationToken, VelvetTask<TQueryFnData>> QueryFn { get; init; }
Property Value
- Func<CancellationToken, VelvetTask<TQueryFnData>>