You could use graph algorithms plugin and specifically connected components algorithm to label all the isolated subgraphs in your graph and then export them and group them later when exported by set id.
Example:

create a sample graph
MERGE (nAlice:User {id:'Alice'})
MERGE (nBridget:User {id:'Bridget'})
MERGE (nCharles:User {id:'Charles'})
MERGE (nDoug:User {id:'Doug'})
MERGE (nMark:User {id:'Mark'})
MERGE (nMichael:User {id:'Michael'})
MERGE (nAlice)-[:FRIEND]->(nBridget)
MERGE (nAlice)-[:FRIEND]->(nCharles)
MERGE (nMark)-[:FRIEND]->(nDoug)
MERGE (nMark)-[:FRIEND]->(nMichael);
Run connected components (unionFind) algorithm and return nodes in the same subgraph:
CALL algo.unionFind.stream('User', 'FRIEND', {})
YIELD nodeId,setId
RETURN setId,collect(algo.getNodeById(nodeId)) AS nodes_from_specific_subgraph
This will return:
╒═══════╤══════════════════════════════════════════════════╕
│"setId"│"specific_subgraph" │
╞═══════╪══════════════════════════════════════════════════╡
│4 │[{"id":"Doug"},{"id":"Mark"},{"id":"Michael"}] │
├───────┼──────────────────────────────────────────────────┤
│0 │[{"id":"Alice"},{"id":"Bridget"},{"id":"Charles"}]│
└───────┴──────────────────────────────────────────────────┘