Deletion with upsert is not working

Did you read the other post I linked?? You don’t put the uid in your types. And you can’t delete it…

yes, I read it.

Your suggestion really helped.

I have one more question.

I am running this query to recursively delete the node and its all children, it is deleting the children but not deleting itself. Could you guide me on this too?

 upsert {
      query {
        q(func: uid($a)) @recurse {
          uid
          b as branches
          c as child_groups
        }
      }

      mutation {
        delete {
          <$a> * * .
          uid(b) * * .
          uid(c) * * .
        }
      }
    }

$a is the uid.