Delete constraint

You open a transaction, do a query, do your checks in the application side and then use the same transaction to do a mutation based on your checks.

Dgraph never checks anything about that. Unless of course if you use upsert procedure.

BTW Soon you gonna be able to do it in a single operation, using upsert block.