Change this to
@filter(NOT has(~child))
it is better, more performative.
I’m not sure I understand it correctly, but you can try using math func to get true/false statements.
e.g:
{
q(func: uid(0x1)){
h as math(10)
test: math(h > 1)
}
}
If you use a variable in the first position of the math function. You will get true/false result.
For example, the variable “h” you can put in a count func. If the value is greater than 1 it will return True.