I’m trying to make a query similar to this and having trouble finding any examples that combine @recurse with filtering on the relationships,
{ log (func: uid(x)) @recurse
name
parent
}
Here parent has it self a name and that can recurse quite deep.
I get back a nested structure like
log{
name: name1
parent {
name: name2
parent {
name: name3
}
}
I’d like to filter (ie, don’t want them returned) any part node on the tree that matches a name for example, but i only manage cut the tree on the first one that doesn’t match not getting any of the deeper nodes and doesn’t lose information about the shape of the graph, still want to keep know whose node is a parent of another.
It might be a data modelling problem in the first place but I wonder if that query is possible
Thanks.