ShortestPath

Find the shortest path between two nodes.

::ShortestPath<EdgeType>::To(to_id: ID)
::ShortestPath<EdgeType>::From(from_id: ID)

Example:

QUERY GetShortestPath(from_id: ID, to_id: ID) {
    path_to <- N<User>(from_id)::ShortestPath::To(to_id)
    path_from <- N<User>(from_id)::ShortestPath::From(to_id)
    RETURN path_to, path_from
}

Return Type of ShortestPath:

[([Nodes], [Edges])]

Note that this is an array of tuples because you can find the shortest path from one node to multiple nodes or vice versa.