---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/query/interfaces/EnginexQueryOptions.md
---
[Reference](../../../../index.md) / [@getenginex/sdk/query](../index.md) / 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`](EnginexQueryFnContext.md)

#### Returns

`Promise`<`T`>

***

### queryKey

> **queryKey**: [`EnginexQueryKey`](../type-aliases/EnginexQueryKey.md)

Query key (see [EnginexQueryKey](../type-aliases/EnginexQueryKey.md)).

***

### staleTime?

> `optional` **staleTime?**: `number`

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