Find all orphan nodes

{
  set {
    _:new <role_name> "test123" .
    _:new <dgraph.type> "Role" .
  }
}
{
  q(func: has(role_name)){
    uid
    role_name
    dgraph.type
  }
}

Results in:

      {
        "uid": "0x45e2a8",
        "role_name": "test123",
        "dgraph.type": [
          "Role"
        ]
      }
{
  delete {
    <0x45e2a8> * * .
  }
}

Query for uid:

{
  q(func: uid(0x45e2a8)){
    uid
  }
}

Results in:

"q": [
      {
        "uid": "0x45e2a8"
      }
    ]

So the orphan node still exists.