diff --git a/libs/langgraph/langgraph/pregel/draw.py b/libs/langgraph/langgraph/pregel/draw.py index 5b84c30c7..3ece304f6 100644 --- a/libs/langgraph/langgraph/pregel/draw.py +++ b/libs/langgraph/langgraph/pregel/draw.py @@ -108,7 +108,11 @@ def draw_graph( for w in task.writers: # apply regular writes if isinstance(w, ChannelWrite): - empty_input = "" if "__root__" in specs else None + empty_input = ( + specs["__root__"].ValueType() + if "__root__" in specs + else None + ) w.invoke(empty_input, task.config) # apply conditional writes declared for static analysis, only once if w not in static_seen: