Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/core / / Dispatch

Class: Dispatch<TArgs>

Defined in: packages/core/src/channels/dispatch.ts:12

Workflow dynamic-task primitive. A node returns one or more Dispatch(nodeName, args) values to schedule additional tasks in the next execution step.

The class is intentionally tiny - the engine inspects only the public nodeName and args fields. The shape is Graphorin's own design (the name Dispatch is part of the public API).

Stable

Type Parameters

Type ParameterDefault type
TArgsunknown

Constructors

Constructor

ts
new Dispatch<TArgs>(nodeName, args): Dispatch<TArgs>;

Defined in: packages/core/src/channels/dispatch.ts:24

Parameters

ParameterType
nodeNamestring
argsTArgs

Returns

Dispatch&lt;TArgs&gt;

Properties

PropertyModifierTypeDefault valueDescriptionDefined in
__graphorinDispatchreadonlytruetrueCross-realm brand (workflow-13): the engine's structural fallback requires this marker so a plain state object that happens to carry nodeName + args keys is treated as channel WRITES, never silently swallowed as a dispatch. A plain own property (not a symbol) so it survives structuredClone across worker boundaries.packages/core/src/channels/dispatch.ts:20
argsreadonlyTArgsundefined-packages/core/src/channels/dispatch.ts:22
nodeNamereadonlystringundefined-packages/core/src/channels/dispatch.ts:21