Reference / @getenginex/sdk/query / EnginexQueryOptions
EnginexQueryOptions<T>
Options of an SDK query, compatible with TanStack Query v5's useQuery, prefetchQuery, fetchQuery and queryOptions (and with the Vue, Svelte and Solid adapters), without depending on it.
Example
ts
const balance = useQuery(createQueries(enginex).wallet.getBalance())Type Parameters
T
T
Properties
queryFn
queryFn: (
context) =>Promise<T>
Calls the SDK method, passing on the context's signal.
Parameters
context
Returns
Promise<T>
queryKey
queryKey:
EnginexQueryKey
Query key (see EnginexQueryKey).
staleTime?
optionalstaleTime?:number
Time, in ms, during which the data is considered fresh. Only on the reads that rarely change (config.*).