Clusterization structure can't be executed due to the complexity of the projection

Hi everyone!
Facing a problem:
I've got a huge graph. Some of the nodes have parameter 'type' (1 or 2)
And according to this type I either take all their neighbours or only outgoing
I want to clusterize all these neighbour nodes

First attempt:
I make a projection of subgraph like
CALL gds.graph.project.cypher('graph1', all_neighbour_nodes for type 1 UNION out_neighbours for type 2, all_connections_between_neighbours_1 UNION all_connections_between_neighbours_2)
Then wcc.stream

But the structure of the subgraph would never be excuted

Second attempt:
Doing the same by batches (for example, apoc.periodic.iter or commit)
Providing clusterization for batch by batch, and either each time generating new property_id and applying it to all nodes inside one cluster
or taking max (in case some nodes have already participated before)

Has anyone faced anything like that? Can you give any advices?
2nd option looks bad and I have troubles realising that

really appreciate any oppinions

Hi Alexx,

Thanks for your question.

It sounds like you have a large graph with nodes that have a 'type' parameter, and you want to clusterize their neighbors based on whether the node's 'type' is 1 or 2. Your first attempt involves creating a subgraph projection using Cypher and then using the Weakly Connected Components (WCC) algorithm to clusterize the neighbor nodes.

However, you're encountering issues with the structure of the subgraph not being executed. This may be due to a variety of factors, such as the Cypher query not returning the expected results, or the graph projection not being properly defined.

To troubleshoot this issue, you could try breaking down the query and running each component separately to see where the issue is occurring. You could also try using different graph algorithms or querying techniques to achieve your desired result.

Ultimately, the best approach will depend on the specifics of your use case and the structure of your graph. If you could provide us with the specific query and a sample data model, that may help clarify the issue.