I think, what you are trying to achieve with this is: Remove all Apps which are not connected to tnnt.cn
. And if you apply @cascade
for tnnt.cn
at root level, it won’t have any effect as tnnt.cn
isn’t a root level predicate.
So, maybe you are looking for this:
{
q(func:type(App)) @cascade(app.tnnt) {
app.cn
app.tnnt @filter(eq(tnnt.cn, "xyz")) @cascade(tnnt.cn) {
tnnt.cn
}
}
}
i.e., remove all the app.tnnt
which don’t have a tnnt.cn
and then also remove all App
which don’t have an app.tnnt