If you want to reverse the direction of your relationships you'll need to use the orientation
configuration option when you load your data, not just swap source/target in the algo call:
CALL gds.graph.create(
'myGraph',
'Location',
'ROAD',
{
relationshipProperties: 'cost',
orientation:'REVERSE'
}
)
you can also set orientation:'UNDIRECTED'
to load a graph without directed edges (inmemory, we duplicate the edges).