Reference / @getenginex/sdk/extension / runMutation
runMutation()
runMutation<
I,R>(call,attempts,input):Promise<R>
Runs the call with the attempt's key and closes the attempt with the result: an ambiguous failure keeps the key, anything else discards it.
Type Parameters
I
I
R
R
Parameters
call
MutationCall<I, R>
The MutationCall from the options.
attempts
The caller's attempt (from createAttempts).
input
I
The mutation input.
Returns
Promise<R>
Example
ts
const data = await runMutation(call, attempts, { amount: 5000 })Throws
Always EnginexError: the call's error, or CONFIGURATION_ERROR if the key cannot be generated (an environment without Web Crypto).