I need to take subgraph of given depth stating from some vertex using bfs. I've tried code similar to following
MATCH (p:Node {id: '1'}) CALL apoc.path.subgraphAll(p, {minLevel: 0, maxLevel: 1}) YIELD nodes, relationships RETURN nodes, relationships;
but it seems to be extremely slow comparing to cypher queries (neo4j 4.3.3) What is the best way to take subgraphs with bfs in neo4j?