Streams the execution of the graph, emitting state updates as they occur. This is the primary method for observing graph execution in real-time.
Stream modes:
stream<
TStreamMode extends StreamMode | StreamMode[] | undefined,
TSubgraphs extends boolean,
TEncoding extends "text/event-stream" | undefined
>(
input: InputType | CommandType | null,
options: Partial<PregelOptions<Record<"__start__" | N, PregelNode<State, Update>>, Record<string | N, BaseChannel<unknown, unknown, unknown>>, ContextType Record<string, any>, TStreamMode, TSubgraphs, TEncoding>>
): Promise<IterableReadableStream<StreamOutputMap<TStreamMode, TSubgraphs, InputType, OutputType, "__start__" | N, NodeReturnType, StreamCustomType, TEncoding>>>| Name | Type | Description |
|---|---|---|
input* | InputType | CommandType | null | The input to start graph execution with |
options | Partial<PregelOptions<Record<"__start__" | N, PregelNode<State, Update>>, Record<string | N, BaseChannel<unknown, unknown, unknown>>, ContextType & Record<string, any>, TStreamMode, TSubgraphs, TEncoding>> | Configuration options for streaming |