CALL gds.degree.stream('mysna')
YIELD nodeId, score
WHERE gds.util.asNode(nodeId).name = 'aniesbaswedan'
RETURN gds.util.asNode(nodeId).name AS name, score AS followers
ORDER BY followers DESC, name DESC limit 100
You could filter the nodes post-processing to return only the ones you want. Assuming the ‘source’ is a property of the nodes you projected, you can filters those from your result with the following query:
CALL gds.degree.stream('mysna')
YIELD nodeId, score
WITH gds.util.asNode(nodeId) node, score AS followers
WHERE node.source = ‘aniesbaswedan’
RETURN node.name as name, followers
ORDER BY followers DESC, name DESC limit 100
is this what you are looking for?
You can also investigate using cypher projection to project only the nodes you want.
Sorry, there was a slight syntax error in my earlier post. It was missing an 'as' clause to bind the 'node' variable.
CALL gds.degree.stream('mysna') YIELD nodeId, score
WITH gds.util.asNode(nodeId) as node, score AS followers
WHERE node.source = 'aniesbaswedan'
RETURN node.name as name, followers
ORDER BY followers DESC, name DESC limit 100
I think you can achieve it by using cypher projection. You can specify what nodes you want projected through a cypher query, allowing you to filter what gets projected.