Adarsh Raj
Adarsh Raj

Reputation: 301

Cypher Query to find out my followers and users i follow?

Hi my relations are like this i---follows----someone, someelse---follows----me , What will be the cypher query ? Problem is that im not able to figure out which is the end node .

Upvotes: 0

Views: 1002

Answers (1)

Antoan Milkov
Antoan Milkov

Reputation: 2228

There are no directions specified in your questions so I hope I guessed them right, but if not, just modify as needed:

Find who you follow:

START n=node(yourNodeID) MATCH n-[:follows]->person RETURN person;

Find who follows you:

START n=node(yourNodeID) MATCH person-[:follows]->n RETURN person;

Hope this helps!

Upvotes: 3

Related Questions