I have a large neo4j graph dataset, where I am trying to get all the nodes present along the path from node A to be node B, which would include the connecting nodes in-between as well as A and B(Let's give the label for these nodes between A and B 'T'). However, when using this query:
MATCH (from:A{ name:'NameA'} ) CALL apoc.path.subgraphNodes(from, { labelFilter:"T|B"} ) YIELD node RETURN node
I get all the nodes that point to B, including those that don’t originate from A. Any help would be appreciated.