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

# useEnginexMutations()

## Call Signature

> **useEnginexMutations**(): [`CoreMutations`](../../sdk/query/interfaces/CoreMutations.md)

Core mutation factories, created once per composable call (in `setup`). Each call
(`m.deposits.createPix()`) returns the mutation options; use it inside the getter of
[useEnginexMutation](useEnginexMutation.md).

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

### Returns

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

The core mutation factories.

### Throws

If called in an app without the `EnginexPlugin`.

### Example

```ts
const m = useEnginexMutations()
const pix = useEnginexMutation(() => m.deposits.createPix())
```

## Call Signature

> **useEnginexMutations**<`P`, `M`>(`factory`, `product`): `M`

Mutation factories of a product package (`createIgamingMutations`, `createPredictionsMutations`),
created once per composable call.

### Type Parameters

#### P

`P`

#### M

`M`

### Parameters

#### factory

(`product`) => `M`

Product factory, e.g. `createIgamingMutations`.

#### product

`P`

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

### Returns

`M`

The product mutation factories.

### Throws

If called in an app without the `EnginexPlugin`.

### Example

```ts
const im = useEnginexMutations(createIgamingMutations, igaming)
const redeem = useEnginexMutation(() => im.loyalty.redeem())
```
