For example 2 hops from c we have a and e.
How can I acheive this? Is it with a recursive query? Can you show me how?
I have gone trough some posts, for example Recursive Queries
But I cannot get a working example(recursive query does not compile), can you please help?
Thank you very much, this works as expected! I have tree more questions:
1)Can I get C parent easily? For example: get all c direct descendants and ascendants, i.e. can I go back?
2)Is there a special property for node type? For example if I have two types of nodes, one for movies and one for directors, how to take all movies?
3)Can I take first 10 nodes, BUT without filter
All these questions could have been answered by doing a little more research as they have been asked before.
Sure, look at reverse edges.
Dgraph doesn’t assign any labels to nodes by default. you have to associate a property for the type of nodes. Then you can do a has query. See Get started with Dgraph
You have to apply a function at root to filter the initial set of nodes. Then you can take the first 10 or first n.