Question mutation delete

Moved from GitHub pydgraph/91

Posted by koenvanderveen:

I am using pydgraph 2.0.2 and dgraph 1.1.0. I have a graph with a node with uid “0x2e” and name “Charlie”. When I run

del_obj = {"uid": "0x2e"}
txn = client.txn();
try:
    txn.mutate(del_obj=del_obj)
    txn.commit()
finally:
    txn.discard()

The node is not deleted. But when I add the name:

del_obj = {"uid": "0x2e", "name": "Charlie"}
txn = client.txn();
try:
    txn.mutate(del_obj=del_obj)
    txn.commit()
finally:
    txn.discard()

The node is deleted. Is this expected behaviour ? If so, is there a way to expand a node without the new type system?

koenvanderveen commented :

So, this also means I can’t get the code under examples/simple/simply.py to work. (It does not delete Bob)

mangalaman93 commented :

Thanks for pointing this out. I have fixed the example now to use the type system and deletion seems to work now. Let me know if you have any more questions.