API reference > @kontsedal/olas-core > createMutation
createMutation() function
A write owned by this controller's lifetime, from an inline spec (§6): the write, its policy and its lifecycle hooks in one object. id is optional here. Devtools, error contexts and plugins name the mutation by it.
Needs a query engine on the root.
Signature:
typescript
export declare function createMutation<V, R>(ctx: Ctx, spec: MutationSpec<V, R>): Mutation<V, R>;Parameters
Parameter | Type | Description |
|---|---|---|
ctx | ||
spec | MutationSpec<V, R> |
Returns:
Mutation<V, R>