Merge pull request #11 from langchain-ai/dqbd/get-graph-async

fix(api): use getGraphAsync instead of getGraph
This commit is contained in:
David Duong
2025-02-24 20:23:29 +01:00
committed by GitHub
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@langchain/langgraph-api",
"version": "0.0.10",
"version": "0.0.11",
"type": "module",
"engines": {
"node": ">=18"
+5 -3
View File
@@ -110,9 +110,11 @@ api.get(
const { xray } = c.req.valid("query");
const graph = getGraph(assistant.graph_id);
return c.json(
graph.getGraph({ ...getRunnableConfig(assistant.config), xray }).toJSON(),
);
const drawable = await graph.getGraphAsync({
...getRunnableConfig(assistant.config),
xray: xray ?? undefined,
});
return c.json(drawable.toJSON());
},
);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@langchain/langgraph-cli",
"version": "0.0.10",
"version": "0.0.11",
"type": "module",
"engines": {
"node": ">=18"