Skip to content

API reference > @kontsedal/olas-devtools > MutationEntry

MutationEntry type ​

One entry in the mutation log. id numbers the log entry; mutationId is the mutation's own id, absent for an inline spec without one. durationMs is set on success/error when the store saw the run start: it pairs the two by the run id core sends as causeId. A cancel closes a run core cancelled, and says why; the store logs one only for a run it saw start.

Signature:

typescript
type MutationEntry = {
  id: number;
  t: number;
  kind: 'run';
  path: readonly string[];
  mutationId?: string;
  vars: unknown;
} | {
  id: number;
  t: number;
  kind: 'success';
  path: readonly string[];
  mutationId?: string;
  result: unknown;
  durationMs?: number;
} | {
  id: number;
  t: number;
  kind: 'error';
  path: readonly string[];
  mutationId?: string;
  error: unknown;
  durationMs?: number;
} | {
  id: number;
  t: number;
  kind: 'rollback';
  path: readonly string[];
  mutationId?: string;
} | {
  id: number;
  t: number;
  kind: 'cancel';
  path: readonly string[];
  mutationId?: string;
  reason: 'superseded' | 'reset' | 'dispose';
  durationMs: number;
};

Released under the MIT License.