@langchain/langgraph
1.7.5 · 17 Nov 2026MIT5.2M / weekRepositoryHomepagenpmAtom feed
1.7.5 is the newest release of 1.x.
In short
2 new1 fixed
Release note
Patch Changes
Fix ConditionalEdgeRouter type rejection
Add unified schema support for
StateGraphconstructorSupport mixing
AnnotationRoot, Zod schemas, andStateSchemafor state, input, and output definitionsAdd
{ input, output }only pattern where state is inferred from input schemaAdd per-node input schema support via
addNodeoptionsDeprecate
stateSchemaproperty in favor ofstateSimplify constructor overloads with unified
StateGraphInittype
Add type bag pattern for
GraphNodeandConditionalEdgeRoutertype utilities.New types:
GraphNodeTypes<InputSchema, OutputSchema, ContextSchema, Nodes>- Type bag interface for GraphNodeGraphNodeReturnValue<Update, Nodes>- Return type helper for node functionsConditionalEdgeRouterTypes<InputSchema, ContextSchema, Nodes>- Type bag interface for ConditionalEdgeRouter
Usage:
Both
GraphNodeandConditionalEdgeRouternow support two patterns:Single schema (backward compatible):
const node: GraphNode<typeof AgentState, MyContext, "agent" | "tool"> = ...
Type bag pattern (new):
const node: GraphNode<{ InputSchema: typeof InputSchema; OutputSchema: typeof OutputSchema; ContextSchema: typeof ContextSchema; Nodes: "agent" | "tool"; }> = (state, runtime) => { // state type inferred from InputSchema // return type validated against OutputSchema // runtime.configurable type inferred from ContextSchema return { answer: "response" }; };
The type bag pattern enables nodes that receive a subset of state fields and return different fields, with full type safety.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.