Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/workflow / / WorkflowConfig
Interface: WorkflowConfig<TState>
Defined in: packages/workflow/src/types.ts:231
Configuration accepted by createWorkflow. The shape is the single point of contact between a consumer's workflow definition and the runtime — every other public type derives from it.
Stable
Type Parameters
| Type Parameter | Default type |
|---|---|
TState extends object | Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
cancelGraceMs? | readonly | number | Grace window (in milliseconds) applied after AbortSignal.abort() before in-flight task promises are considered orphaned. Default: 100 ms. | packages/workflow/src/types.ts:255 |
channels | readonly | Readonly<{ [K in keyof TState]: Channel<TState[K]> }> | - | packages/workflow/src/types.ts:235 |
checkpointStore | readonly | CheckpointStore | - | packages/workflow/src/types.ts:239 |
durability? | readonly | DurabilityMode | Default durability mode. Defaults to sync. | packages/workflow/src/types.ts:241 |
edges | readonly | readonly WorkflowEdge<TState>[] | - | packages/workflow/src/types.ts:234 |
initialState? | readonly | Partial<TState> | Optional initial state — merged with the input on execute(...). | packages/workflow/src/types.ts:237 |
maxSteps? | readonly | number | Maximum number of execution steps before the engine bails out — an infinite-loop safeguard that surfaces as a structured error. Default: 200. | packages/workflow/src/types.ts:249 |
name | readonly | string | - | packages/workflow/src/types.ts:232 |
nodes | readonly | Readonly<Record<string, WorkflowNode<TState>>> | - | packages/workflow/src/types.ts:233 |
pauseAt? | readonly | WorkflowPauseAt | - | packages/workflow/src/types.ts:238 |
tracer? | readonly | Tracer | Optional tracer; defaults to the framework's NOOP_TRACER. | packages/workflow/src/types.ts:243 |
validateState? | readonly | (state) => void | Optional state validator. When provided, the engine calls it after applying every step's writes; any thrown error produces a state-validation-failed workflow error and aborts the run. | packages/workflow/src/types.ts:261 |