mirror of
https://github.com/maciejpedzich/six-degs-of-f1.git
synced 2024-11-28 00:05:46 +01:00
Adjust shortest path query to use Memgraph's ASP function
This commit is contained in:
parent
36265e86b5
commit
5084dd49e9
@ -22,7 +22,7 @@ export async function getShortestPaths(source: string, dest: string) {
|
|||||||
WHERE
|
WHERE
|
||||||
(s.forename + " " + s.surname) = $source
|
(s.forename + " " + s.surname) = $source
|
||||||
AND (d.forename + " " + d.surname) = $dest
|
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;`,
|
RETURN path;`,
|
||||||
{ source, dest }
|
{ source, dest }
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user