If all nodes are of same type, then you should use type query instead of recursing through the nodes.
{
q(func: type(IdNode)) {
uid
name
}
}
If all nodes are of same type, then you should use type query instead of recursing through the nodes.
{
q(func: type(IdNode)) {
uid
name
}
}