Does Dgraph have any way to trigger some action before/after a mutation has been called?
Nope, but there is subscriptions. Which you can create a “bot” to sign to subscribe to specific queries and do any kind of trigger you want. I the future we might have native triggers, but that is something for 2021+.
As Michel mentioned, there are no automated triggers at present. But, you can have a
manual trigger mechanism using the
@custom directive. Refer this post to find out if that works for your use case.