I’m happily able to perform mutations through dgraph-js, but I’d like to get the response after adding a new node (in particular the generated uid). Where and how am I supposed to do this?
const txn = this.dgraphClient.newTxn();
try {
const mu: Mutation = new dgraph.Mutation();
mu.setSetJson(data);
await txn.mutate(mu);
await txn.commit();
console.log(txn);
} catch(e) {
console.log(e);
} finally {
await txn.discard();
}