Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

Does APOC path expander procedures have option to include starting node and relationship(s)?


I noticed that when I use
CALL apoc.path.expandConfig(n) , the node n and the rel leading to its immediate neighbor is included in all the paths that YIELDed.

On the other hand, if I use
'CALL apoc.path.subgraphAll(n)', the node and the neighbor rel are not included in the nodes and relationships that are YIELDed. I am wondering if there is any option in the config map that includes the starting node and relationship(s). This would be a nice to have this option. If not, I am having to use the
'CALL apoc.path.expandConfig(n)' and 'apoc.coll.toSet(apoc.coll.flatten(.)))' the nodes and rels. of the paths that are outputted.

PS: Depending on context, "reachability of node" can include or not the starting node and relationship(s).

Let me know.