[PR #620] [MERGED] feat(langgraph): add subgraph add node option to explicitly specify subgraphs #895

Closed
opened 2026-02-15 19:16:19 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/620
Author: @dqbd
Created: 10/22/2024
Status: Merged
Merged: 10/22/2024
Merged by: @jacoblee93

Base: mainHead: dqbd/subgraph-add-node-third-arg


📝 Commits (1)

  • 8395b60 feat(subgraph): add subgraph add node option to explicitly specify subgraphs

📊 Changes

9 files changed (+235 additions, -111 deletions)

View changed files

📝 libs/langgraph/src/graph/graph.ts (+16 -5)
📝 libs/langgraph/src/graph/state.ts (+9 -1)
📝 libs/langgraph/src/pregel/algo.ts (+2 -0)
📝 libs/langgraph/src/pregel/debug.ts (+2 -1)
📝 libs/langgraph/src/pregel/index.ts (+29 -22)
📝 libs/langgraph/src/pregel/read.ts (+5 -0)
📝 libs/langgraph/src/pregel/types.ts (+1 -0)
📝 libs/langgraph/src/pregel/utils/subgraph.ts (+8 -3)
📝 libs/langgraph/src/tests/pregel.test.ts (+163 -79)

📄 Description

Unlike in Python, we need to specify the subgraphs beforehand when adding nodes with lambdas that invoke the subgraph.

This is necessary to ensure that:

  1. Nested interrupts are properly handled
  2. Debug stream events include checkpoint metadata
  3. Both the graph and the subgraph are introspectable

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/620 **Author:** [@dqbd](https://github.com/dqbd) **Created:** 10/22/2024 **Status:** ✅ Merged **Merged:** 10/22/2024 **Merged by:** [@jacoblee93](https://github.com/jacoblee93) **Base:** `main` ← **Head:** `dqbd/subgraph-add-node-third-arg` --- ### 📝 Commits (1) - [`8395b60`](https://github.com/langchain-ai/langgraphjs/commit/8395b6092cecb16449f8ad7e5faaf41dba007bf7) feat(subgraph): add subgraph add node option to explicitly specify subgraphs ### 📊 Changes **9 files changed** (+235 additions, -111 deletions) <details> <summary>View changed files</summary> 📝 `libs/langgraph/src/graph/graph.ts` (+16 -5) 📝 `libs/langgraph/src/graph/state.ts` (+9 -1) 📝 `libs/langgraph/src/pregel/algo.ts` (+2 -0) 📝 `libs/langgraph/src/pregel/debug.ts` (+2 -1) 📝 `libs/langgraph/src/pregel/index.ts` (+29 -22) 📝 `libs/langgraph/src/pregel/read.ts` (+5 -0) 📝 `libs/langgraph/src/pregel/types.ts` (+1 -0) 📝 `libs/langgraph/src/pregel/utils/subgraph.ts` (+8 -3) 📝 `libs/langgraph/src/tests/pregel.test.ts` (+163 -79) </details> ### 📄 Description Unlike in Python, we need to specify the subgraphs beforehand when adding nodes with lambdas that invoke the subgraph. This is necessary to ensure that: 1. Nested interrupts are properly handled 2. Debug stream events include checkpoint metadata 3. Both the graph and the subgraph are introspectable --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 19:16:19 -05:00
yindo closed this issue 2026-02-15 19:16:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#895