Initialization options for StateGraph. Accepts any combination of schema types for state/input/output.
Supports both state and stateSchema as aliases for backward compatibility.
If only input is provided (no state/stateSchema), input is used as the state schema.
StateGraphInitUser provided context
Interrupts the execution of a graph node.
This function can be used to pause execution of a node, and return the value of the resume
input when the graph is re-invoked using Command.
Multiple interrupts can be called within a single node, and each will be handled sequentially.
When an interrupt is called:
resume value available (from a previous Command), it returns that value.GraphInterrupt with the provided valueCommand with a resume valueBecause the interrupt function propagates by throwing a special GraphInterrupt error,
you should avoid using try/catch blocks around the interrupt function,
or if you do, ensure that the GraphInterrupt error is thrown again within your catch block.
The nodes in the graph, mapping node names to their PregelNode instances
Primary key for state schema
Callback to send custom data chunks via the custom stream mode