Browse documentation

MutationConfig

Type. Mutation executor and outcome callbacks.

Table of contents

Category

Type

Type import

ts
import type { MutationConfig } from "valyrian.js/query";

Public signature

ts
type MutationConfig<TPayload, TResult> = { execute: (payload: TPayload) => Promise<TResult> | TResult; onSuccess?: (result: TResult) => void; onError?: (error: unknown) => void; };

Type usage

MutationConfig types the write payload, result and optional outcome callbacks.