Closed micahstubbs closed 7 years ago
now I wonder why the custom vis only shows 6
relationships, when we can see 15
relationships in neo4j 🤔
ok, now I see why. in the current query we send back to neo4j, we only ask for the relationships between the queried node and it's 1st degree connections.
this tutorial is helpful https://www.airpair.com/neo4j/posts/getting-started-with-neo4j-and-cypher
trying out this query that gets "friends of friends" or 2nd degree connections
MATCH (n)-[r:LINKS_TO]-(f)
WHERE n.gistId = "6ac67b0d8ed673c9aa61"
MATCH (n)-[:LINKS_TO]-()-[:LINKS_TO]-(fof)
RETURN n, fof, r
blocked by this node dragging https://github.com/micahstubbs/blockbuilder-graph-search-ui/issues/20 right now
was blocked by #29 as well, now unblocked 🎉
looks better with node dragging
I think this is it!
match all the relationships where the destination node is the block we specify find all the friends-of-friends of the origin blocks return the origin blocks, their friends of friends, and our original one destination block as well
MATCH (n)-[r:LINKS_TO]-(f)
WHERE f.gistId = "8a173cfcb9171627c7f1"
MATCH (n)-[:LINKS_TO]-()-[:LINKS_TO]-(fof)
RETURN n, fof, f
now to make a better default layout
this query is is really close