Skip to main content

Variable: graph

const graph: object

Defined in: packages/core/src/graph/stream.ts:179

Type Declaration​

choose​

choose: <I, O, S>(config) => Processable<I, I | O>

Select once, persist the key, and enter only the selected graph scope.

Type Parameters​

I​

I

O​

O

S​

S = string

Parameters​

config​

ChoiceConfig<I, O, S>

Returns​

Processable<I, I | O>

compile​

compile: <I, O>(value, options) => CompiledGraph<I, O> = compileDefinition

Type Parameters​

I​

I = unknown

O​

O = unknown

Parameters​

value​

GraphDefinition

options​
durable?​

boolean

registry​

OperationRegistry

Returns​

CompiledGraph<I, O>

map​

map: <I, O>(body, config) => Processable<readonly I[], O[]> = mapEach

Map keeps array output distinct from batch's per-item outcome envelope.

Type Parameters​

I​

I

O​

O

Parameters​

body​

Child<I, O>

config?​
concurrency?​

number

Returns​

Processable<readonly I[], O[]>

repeat​

repeat: <T>(config) => Processable<T, T>

Type Parameters​

T​

T

Parameters​

config​

RepeatConfig<T>

Returns​

Processable<T, T>

retry​

retry: <I, O>(config) => Processable<I, O>

Attempts have distinct checkpoint addresses; queue redelivery reuses them.

Type Parameters​

I​

I

O​

O

Parameters​

config​

RetryConfig<I, O>

Returns​

Processable<I, O>

from()​

from<TInput, TOutput>(build): GraphProcessable<TInput, TOutput>

graph.from<TInput>(build) is the root entry point for the fluent API.

The build callback receives a typed source stream and must return the sink stream. Input type is fixed by the explicit <TInput>; output type is inferred from the returned stream. Plans the DAG eagerly — cycles become construction-time PlanErrors rather than runtime failures.

The returned Processable is a drop-in replacement anywhere a Processable is expected — compose it with pipeline(), nest it inside another graph, subscribe to it, pass hooks at process time.

Type Parameters​

TInput​

TInput

TOutput​

TOutput

Parameters​

build​

(src) => Stream<TOutput>

Returns​

GraphProcessable<TInput, TOutput>