Run APOC algorithms on virtual (or projected) graph


Is it possible to run APOC algorithms (e.g. Dijkstra) on a virtual (or projected) graph?

For instance, using the London graph example from this blog:
Create projected_graph as:

CALL gds.graph.create.cypher(
"MATCH (n:Node) RETURN id(n) AS id",
"MATCH (n)-[r:RELATED]->(m) RETURN id(n) AS source, id(m) AS target, toFloat(r.length) AS length"

And then use apoc.algo.dijkstra on this 'projected_graph' to perform a shortest path search with 'length' as weight.

Thanks, Ariel

1 Like

This is a great question, I hope somebody answers it