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 } );