How to find nodes without dgraph.type?

Oh, you wanna find “empty nodes”. From the way you said it, I thought you wanted any nodes with some information. So in your case, you wanna find “dangling empty nodes”.

You can try with reverse

query {
  va1 as var(func: has<(~pred1>))
  va2 asvar(func: has(<~pred2>))
 
  node(func: uid(va1,va2)) @filter(NOT has(dgraph.type)) {
    uid
  }
}

Or query for the parent node and collect only those children who don’t have dgraph.type.

3 Likes