Mutable DAG in Dgraph

I’m wondering if it’s possible to maintain a mutable directed acyclic graph built on Dgraph. Whenever a new edge is to be added I need to make sure that it isn’t going to create a cycle. I’d be comfortable doing this on a single database instance, but with a distributed system I’m worried about race conditions, e.g. if I try and add an edge from node A to node B, and far away at a similar time someone adds an edge from node B to node A.