How to get group of connected nodes?

You were pretty close :slight_smile:

CALL gds.wcc.stream({
    nodeProjection: "*",
    relationshipProjection: "*"
})
YIELD nodeId, componentId
WITH componentId, gds.util.asNode(nodeId) AS n
WHERE n:Label
RETURN componentId, collect(n.name) AS nodes