MutationBuilder
Configures a Mutation: a deliberate write operation with declared input, output and Grants.
Remarks
Section titled “Remarks”A Mutation is the entry point for work that changes Items. The type parameters carry the generated input, output, App and context types so that generated Mutation builders stay assignable to this interface.
- AppBuilder.addMutation
- Events
- MutationDefinition for the emitted Definition
- MutationHandlerInstance for invoking the Mutation inside an execution
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”_TInput
Section titled “_TInput”_TInput = any
Parsed input type of the handler.
_TOutput
Section titled “_TOutput”_TOutput = any
Result type of the handler.
_TCurrent
Section titled “_TCurrent”_TCurrent = WriteAppInstance
App instance type handed to the handler.
_TContext
Section titled “_TContext”_TContext = WriteRuntimeInstance
Write context type handed to the handler.
Properties
Section titled “Properties”
readonlyinput:InputBuilder
Input declaration; add values with addProperty, addArray, addObject or addJson.
output
Section titled “output”
readonlyoutput:OutputBuilder
Result declaration; select the shape with item, value, object, template or void.
readonlyprn:string
Platform Resource Name of the declared resource, derived from the App key and resource key.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”addGrant()
Section titled “addGrant()”addGrant(
role):OperationGrant
Grants a Role permission to call this operation.
Parameters
Section titled “Parameters”Role permitted to call the operation.
Returns
Section titled “Returns”The Grant builder.
Remarks
Section titled “Remarks”The Grant only permits the call. Inside the handler, Item and Property access is still checked against the caller’s Roles and Grants.
Example
Section titled “Example”Granting a Mutation to administrators
closePayRun.addGrant(core.roles.admin);Inherited from
Section titled “Inherited from”setDescription()
Section titled “setDescription()”setDescription(
description):this
Sets the description emitted into the definition and rendered in generated reference and application assets.
Parameters
Section titled “Parameters”description
Section titled “description”string
Human-readable description of the resource.
Returns
Section titled “Returns”this
This builder for chaining.
Inherited from
Section titled “Inherited from”BaseOperationBuilder.setDescription
toDefinition()
Section titled “toDefinition()”toDefinition():
MutationDefinition
Emits the Definition of this Mutation, including its handler.

