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

Reference / @getenginex/sdk/query / EnginexMutationFactoryOptions

EnginexMutationFactoryOptions ​

Options accepted by the mutation factories of idempotent methods (those that send Idempotency-Key, like deposits.createPix).

Properties ​

idempotencyKey? ​

optional idempotencyKey?: string

Idempotency key used on every call of this mutation, to repeat the operation after an error, in another mutate(), without duplicating it. Without it, the attempt's key is reused only after an ambiguous failure (network, timeout, 5xx, KEY_IN_USE or VALIDATION_ERROR after a 2xx) with the same input (by content); success, other 4xx and cancellation discard it. Use one value per operation (generated when the player confirms, e.g. crypto.randomUUID()), never a fixed value for the screen: with the same key, the gateway returns the result (or the error) of the first operation.