From 5084dd49e985f26f0c37a505e7b82b662b269a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99dzich?= Date: Sat, 27 Jul 2024 18:55:45 +0200 Subject: [PATCH] Adjust shortest path query to use Memgraph's ASP function --- src/db/getShortestPaths.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/getShortestPaths.ts b/src/db/getShortestPaths.ts index a852008..036e829 100644 --- a/src/db/getShortestPaths.ts +++ b/src/db/getShortestPaths.ts @@ -22,7 +22,7 @@ export async function getShortestPaths(source: string, dest: string) { WHERE (s.forename + " " + s.surname) = $source AND (d.forename + " " + d.surname) = $dest - MATCH path = allShortestPaths((s)-[*..20]-(d)) + MATCH path = (s)-[:WAS_TEAMMATES_WITH *ALLSHORTEST (r, n | 1)]-(d) RETURN path;`, { source, dest } );