Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/workflow / node / createNode
Function: createNode()
ts
function createNode<TState>(opts): WorkflowNode<TState>;Defined in: packages/workflow/src/node.ts:24
Construct a WorkflowNode. The wrapper exists to give the engine a stable shape and to keep createWorkflow({...}) callers from instantiating nodes by hand. Carries the optional per-node execution policy (D1 / workflow-03): timeoutMs + retry.
Type Parameters
| Type Parameter | Default type |
|---|---|
TState extends object | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
opts | { name: string; retry?: WorkflowNodeRetryPolicy; run: WorkflowNodeRun<TState>; timeoutMs?: number; } |
opts.name | string |
opts.retry? | WorkflowNodeRetryPolicy |
opts.run | WorkflowNodeRun<TState> |
opts.timeoutMs? | number |
Returns
WorkflowNode<TState>