GDS also gives us the option to run an algorithm without a named projected graph. In this case, the projected graph will be generated on the fly when calling the GDS procedure. For instance, in order to get the node degree for an undirected graph, you can use the following code:
CALL gds.alpha.degree.stream(
{
nodeProjection: "Node",
relationshipProjection: {
LINKED_TO: {
type: "LINKED_TO",
orientation: "UNDIRECTED"
}
}
}
) YIELD nodeId, score
RETURN gds.util.asNode(nodeId).name as nodeName, score
ORDER BY score DESC
This query returns the following results:
╒══════════╤═══════╕
│"nodeName"│"score"│
╞════════...