Search code examples
cyphergraph-databasesmemgraphdb

What query do I have to execute to get back all of the wanted results from Memgraph's database?


I have a node in Memgraph's database called Page and a relationship called HasLink. What query do I have to execute to get back all of the pages that are connected with relationship HasLink?


Solution

  • I tried running

    MATCH (p1:Page)-[link:HasLink]->(p2:Page) RETURN p1, link, p2

    And it worked. I just needed to check my node and relationship labels. Found out about this as well: Memgraph docs have Cypher manual with a lot of useful things for begginers.