This version (v0.7) has not been published to npm yet.
Skip to content

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 ​

EnginexQueryFnContext

Returns ​

Promise<T>


queryKey ​

queryKey: EnginexQueryKey

Query key (see EnginexQueryKey).


staleTime? ​

optional staleTime?: number

Time, in ms, during which the data is considered fresh. Only on the reads that rarely change (config.*).