Reputation: 357
I'm using Memgraph and I was wondering about how can I paginate the result to a certain depth to build a knowledge graph and display it? I'm looking for a certain query I can use in Memgraph Lab in order to achieve this
Upvotes: 0
Views: 23
Reputation: 1411
It is important to learn about RETURN
clause and its options (SKIP & LIMIT, ORDER BY). Besides that, you can use query that limits the amount of hops, such as:
MATCH ({name: 'United Kingdom'})<-[:LIVING_IN*1..2]-(n) RETURN n;
You can learn more about it here: https://memgraph.com/docs/advanced-algorithms/built-in-graph-algorithms#depth-first-search
Upvotes: 0