I did as you said, I deleted only the comment UID but I am not getting a lesser values in my count(comment)
. Suppose I have 4 comments and then I delete one of them by using the UID. So when I query again, I still get count(comment) = 4.
It is mentioned here in the docs Get started with Dgraph , that
The pattern S * * deletes all edges out of a node (the node itself may remain as the target of edges), any reverse edges corresponding to the removed edges and any indexing for the removed data.
So when I just deleted the comment node by using a single comment UID, it deleted only the edges out of the comment node.
I checked the deleted node by using its UID in ratel. It shows that all the values of the comment node are deleted but the UID itself is still present. Is it because of that my count is not updating?
As You can see in here, the Answer
node has comment
as an outward edge. So in order to get the count one less number after deleting a single comment I have to delete the edge too between Answer
and comment
as I was doing previously?
I am sorry, I am confusing something.