0

So when I run the following query against my DB I get 168 nodes returned.

MATCH (u:Undefined)
CALL apoc.path.subgraphNodes(u, {}) YIELD node
RETURN node

This works as expected in both Neo4j Bloom (1.3.2) and Desktop Browser (1.2.8)

If I run this query, so I can get the relationships as well, then I get 154 nodes returned in Bloom, while Desktop Browser still correctly returns 168 nodes as expected.

MATCH (u:Undefined)
CALL apoc.path.subgraphAll(u, {}) YIELD nodes, relationships
RETURN nodes, relationships

In my graph 154 of the nodes are tied together in this query, in one big inter-connected clump. There are 3 other small clumps of 3, 3 and 8 nodes, that make up the missing 14 nodes. These are what is being missed in Bloom.

Am I missing something? Is there an issue in Bloom?

Anyone have a better idea on how I can return all nodes and relationships, that start at a given node type/label, in Bloom, if this doesn't work?

1 Answers1

0

It looks like Neo4j Bloom doesn't handle an array of nodes and an array of relationships as an input. Try the following query:

MATCH (u:Undefined)
CALL apoc.path.subgraphAll(u, {}) YIELD nodes, relationships
UNWIND relationships as rel
RETURN startNode(rel),rel,endNode(rel)

Not sure if it will work. You could also try and use an APOC procedure that returns paths like for example apoc.path.expand.

Tomaž Bratanič
  • 6,319
  • 2
  • 18
  • 31