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,
},
queryClient
);
Argumentsโ
See fetchQuery(...) for the full list of arguments.
Returnsโ
Promise<void>
- a promise that resolves when the query is successfully cached