prefetchQuery(...)
The method allows you to fetch data and cache it before it's needed.
To understand how prefetchQuery
handles data and cache management,
refer to the TanStack queryClient.prefetchQuery 🌴 documentation.
const result = qraft.<service>.<operation>.prefetchQuery(
{
parameters,
requestFn,
baseUrl,
...prefetchQueryOptions,
}
);
Arguments​
See fetchQuery(...) for the full list of arguments.
Returns​
Promise<void>
- a promise that resolves when the query is successfully cached