I want to get a node with its all accessible nodes,so i use @recurse .like c i will get (BEF) ,like j
i will get(h) There are to problems
1.with the result of recurse there has no edges showed in graph
2.If I want to find multiple nodes at once, there is no way to distinguish results of ‘c’ and ‘j’
I have tried recurse with ~ but maybe dgraph don’t support it
I wonder if there any better way to solve this problem or i should update my schema
#SCHEMA
{
set {
_:A <guid_to> _:g1 .
_:g1 <guid_to> _:B .
_:B <guid_to> _:g1 .
_:g1 <guid_to> _:C .
_:B <guid_to> _:E .
_:E <guid_to> _:B .
_:B <guid_to> _:g2 .
_:C <guid_to> _:g1 .
_:g2 <guid_to> _:F .
_:g3 <guid_to> _:H .
_:H <guid_to> _:g3 .
_:H <guid_to> _:J .
_:J <guid_to> _:H .
_:A <name> "a" .
_:B <name> "b" .
_:C <name> "c" .
_:D <name> "d" .
_:E <name> "e" .
_:F <name> "f" .
_:G <name> "g" .
_:H <name> "h" .
_:J <name> "j" .
_:g1 <name> "g1" .
_:g1 <gtype> "g1" .
_:g2 <name> "g2" .
_:g2 <gtype> "g2" .
}
}
#QUERY
{
node (func: eq(name, ["c","j"])) @recurse{
gt as guid_to
}
exclude (func:has(gtype)){
en as name
}
result (func: uid(gt)) @filter(NOT uid(en)){
name
}
}