Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

MutationAttempt

interfaz Since 1.2.0

Un intento de una mutación que terminó, tal como lo reciben onSuccess y onError.

ts
import type { MutationAttempt } from "@meekojs/meeko/framework";

Source code src/app/runtime/mutations.ts:62

Declaración #

ts
interface MutationAttempt<Input> {
	readonly input: Input
	readonly idempotencyKey: string | null
	readonly trigger: 'mutate' | 'retry' | 'resume'
}

Type parameters #

Input

Entrada de la mutación.

Example #

ts
import type { MutationAttempt } from "@meekojs/meeko/framework";

function origin(attempt: MutationAttempt<{ total: number }>): string {
  return attempt.trigger === "resume" ? "reintento automático" : "envío del usuario";
}

Propiedades #

input #

propiedad sólo lectura

readonly input: Input

Entrada enviada; con retrySafe, tal como viaja en JSON.

idempotencyKey #

propiedad sólo lectura

readonly idempotencyKey: string | null

UUID de la cabecera Idempotency-Key, o null sin retrySafe.

trigger #

propiedad sólo lectura

readonly trigger: 'mutate' | 'retry' | 'resume'

Qué envió el intento: "mutate", "retry" (una llamada a retry()) o "resume" (el reintento automático de retrySafe al montarse un componente o al volver la conexión).

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/app/runtime/mutations.ts