---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk-vue/functions/useEnginexQueries.md
---
[Reference](../../../index.md) / [@getenginex/sdk-vue](../index.md) / useEnginexQueries

# useEnginexQueries()

## Call Signature

> **useEnginexQueries**(): [`CoreQueries`](../../sdk/query/interfaces/CoreQueries.md)

Core query factories, created once per composable call (in `setup`). Each call
(`q.wallet.getBalance()`) returns the options with the user key **as of the call**; use it
inside the getter of [useEnginexQuery](useEnginexQuery.md), which runs again when the session changes.

With `(factory, product)` it returns the factories of a product package (see the other signature).

### Returns

[`CoreQueries`](../../sdk/query/interfaces/CoreQueries.md)

The core query factories.

### Throws

If called in an app without the `EnginexPlugin`.

### Example

```ts
const q = useEnginexQueries()
const balance = useEnginexQuery(() => q.wallet.getBalance(), { refetchInterval: 10_000 })
```

## Call Signature

> **useEnginexQueries**<`P`, `Q`>(`factory`, `product`): `Q`

Query factories of a product package (`createIgamingQueries`, `createPredictionsQueries`),
created once per composable call. As in the core, call each factory inside the getter.

### Type Parameters

#### P

`P`

#### Q

`Q`

### Parameters

#### factory

(`product`) => `Q`

Product factory, e.g. `createIgamingQueries`.

#### product

`P`

The product object, e.g. the one returned by `createIgaming(enginex)`.

### Returns

`Q`

The product query factories.

### Throws

If called in an app without the `EnginexPlugin`.

### Example

```ts
const ig = useEnginexQueries(createIgamingQueries, igaming)
const games = useEnginexQuery(() => ig.casino.listGames({ page: 1 }))
```
