When using GDS, we need to define the projected graph. In this case, we can use the simplest syntax since we want to add all the nodes and all their relationships in their natural direction:
CALL gds.graph.create("projected_graph", "Node", "LINKED_TO")
Then, we can use this projected graph to run the degree centrality algorithm:
CALL gds.alpha.degree.stream("projected_graph")
YIELD nodeId, score
RETURN gds.util.asNode(nodeId).name as nodeName, score
ORDER BY score DESC
The result of this query is reproduced here:
╒══════════╤═══════╕
│"nodeName"│"score"│
╞══════════╪═══════╡
│"A"...