Creating a projected graph that will have all the relationships in the reverse direction requires a detailed configuration for the relationship's orientation:
CALL gds.graph.create(
"projected_graph_incoming",
"Node",
{
LINKED_TO: {
relationship: "LINKED_TO",
orientation: "REVERSE"
}
}
)
This new projected graph (projected_graph_incoming) contains the nodes with the Node label. It will also have relationships that are of the LINKED_TO type, which will be copies of the LINKED_TO relationships from the original graph but in the REVERSE direction. In other words, if the original graph contains the (A)-[:LINKED_TO]->(B) relationship, then the projected graph will only contain the (B)-[:LINKED_TO]->(A) pattern. You can run the degree centrality algorithm on this new projected graph with the following query:
CALL gds.alpha...