From 5382c09fae89154c39104df442c080faf08d2294 Mon Sep 17 00:00:00 2001 From: wendsomadil <149882992+wendsomadil@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:14:29 +0000 Subject: [PATCH] Update graph.ts --- src/modules/graph.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/graph.ts b/src/modules/graph.ts index ed9e1ed..c3257d6 100644 --- a/src/modules/graph.ts +++ b/src/modules/graph.ts @@ -13,8 +13,14 @@ let graph: Neo4jGraph; */ export async function initGraph(): Promise { if (!graph) { - // TODO: Create singleton and wait for connection to be verified - } + // Create singleton and wait for connection to be verified + graph = await Neo4jGraph.initialize({ + url: process.env.NEO4J_URI as string, + username: process.env.NEO4J_USERNAME as string, + password: process.env.NEO4J_PASSWORD as string, + database: process.env.NEO4J_DATABASE as string | undefined, + }); +} return graph; }