[PR #1288] [MERGED] fix(langgraph): zod 4 registry reducer schema #1356

Closed
opened 2026-02-15 20:15:24 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/1288
Author: @dqbd
Created: 6/16/2025
Status: Merged
Merged: 6/20/2025
Merged by: @dqbd

Base: mainHead: dqbd/zod-4-registry-types


📝 Commits (6)

  • 69bdfc9 fix(langgraph): zod 4 registry reducer schema
  • ff48e37 Fix build
  • 1e62d43 Add intersection for hidden type
  • bc71b1a Do not affect the input schema
  • c9f1c14 Fix lint
  • c5c6254 Avoid importing v4 if not needed

📊 Changes

1 file changed (+35 additions, -1 deletions)

View changed files

📝 libs/langgraph/src/graph/zod/zod-registry.ts (+35 -1)

📄 Description

.registry(...) does not support modifying the input Zod internal, thus the input types for graphs are incorrectly inferred to output type. Goal is to augment ZodType with an overloaded .registry(LanggraphZodMetaRegistry) method, that casts the return type to proper schema.


🔄 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/1288 **Author:** [@dqbd](https://github.com/dqbd) **Created:** 6/16/2025 **Status:** ✅ Merged **Merged:** 6/20/2025 **Merged by:** [@dqbd](https://github.com/dqbd) **Base:** `main` ← **Head:** `dqbd/zod-4-registry-types` --- ### 📝 Commits (6) - [`69bdfc9`](https://github.com/langchain-ai/langgraphjs/commit/69bdfc9819ee1e148ebd2bef580cef9aa8cc1e1a) fix(langgraph): zod 4 registry reducer schema - [`ff48e37`](https://github.com/langchain-ai/langgraphjs/commit/ff48e37b3e524521f58ad9f08654cfef19cbbe02) Fix build - [`1e62d43`](https://github.com/langchain-ai/langgraphjs/commit/1e62d4380a69d3bddfc4b6044d9b3b3547608458) Add intersection for hidden type - [`bc71b1a`](https://github.com/langchain-ai/langgraphjs/commit/bc71b1aed242b384d546e9ca61a6c009b8dffe2b) Do not affect the input schema - [`c9f1c14`](https://github.com/langchain-ai/langgraphjs/commit/c9f1c14cde6c5832ef474ab674671c1dcb70e9f1) Fix lint - [`c5c6254`](https://github.com/langchain-ai/langgraphjs/commit/c5c625469592ecd1a9f1ed608c9c898ea69f915a) Avoid importing v4 if not needed ### 📊 Changes **1 file changed** (+35 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `libs/langgraph/src/graph/zod/zod-registry.ts` (+35 -1) </details> ### 📄 Description `.registry(...)` does not support modifying the `input` Zod internal, thus the input types for graphs are incorrectly inferred to output type. Goal is to augment `ZodType` with an overloaded `.registry(LanggraphZodMetaRegistry)` method, that casts the return type to proper schema. --- <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 20:15:24 -05:00
yindo closed this issue 2026-02-15 20:15:24 -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#1356