Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/workflow / / NodeRunResult

Type Alias: NodeRunResult<TState>

ts
type NodeRunResult<TState> = 
  | undefined
  | Partial<TState>
  | DispatchLike
  | ReadonlyArray<
  | DispatchLike
| Partial<TState>>;

Defined in: packages/workflow/src/types.ts:176

Permissible return shapes from a node's run(...) callback.

  • undefined — the node performed a side effect with no state writes.
  • Partial<TState> — channel writes (one entry per channel).
  • Dispatch | Dispatch[] — schedule additional tasks for the next execution step (see Dispatch).
  • (Partial<TState> | Dispatch)[] — mix of writes and dispatches produced in a single call.

Type Parameters

Type ParameterDefault type
TState extends objectRecord&lt;string, unknown&gt;

Stable