My mutation looks something like this
// mutate with variables
const p = {
"Profile.username": username,
"Profile.rname": rname,
"Profile.profilePicture": profilePicture,
"Profile.backgroundPicture": backgroundPicture,
"Profile.accent": accent,
"Profile.isVerified": false,
"Profile.isBanned": false,
};
const mu = new dgraph.Mutation();
mu.setSetJson(p);
await txn.mutate(mu);
await txn.commit();
return true;
and relationships using the setSetNquads function