input arg on addNode does not support Zod schemas #226

Closed
opened 2026-02-15 17:17:35 -05:00 by yindo · 0 comments
Owner

Originally created by @bracesproul on GitHub (Apr 10, 2025).

.addNode("reflection", reflectionGraph, {
  input: ReflectionZodState, // Zod state schema
})

Error:

Type 'ZodObject<{ messages: ZodType<BaseMessage[], ZodEffectsDef<ZodType<BaseMessage[], ZodTypeDef, BaseMessage[]>>, BaseMessage | BaseMessage[]>; reasoning: ZodDefault<...>; answer: ZodDefault<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>' is missing the following properties from type 'AnnotationRoot<any>': lc_graph_name, State, Update, Node, spects(2739)
(property) input?: AnnotationRoot<any> | undefined
Originally created by @bracesproul on GitHub (Apr 10, 2025). ```typescript .addNode("reflection", reflectionGraph, { input: ReflectionZodState, // Zod state schema }) ``` Error: ```txt Type 'ZodObject<{ messages: ZodType<BaseMessage[], ZodEffectsDef<ZodType<BaseMessage[], ZodTypeDef, BaseMessage[]>>, BaseMessage | BaseMessage[]>; reasoning: ZodDefault<...>; answer: ZodDefault<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>' is missing the following properties from type 'AnnotationRoot<any>': lc_graph_name, State, Update, Node, spects(2739) (property) input?: AnnotationRoot<any> | undefined ```
yindo closed this issue 2026-02-15 17:17:35 -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#226