I am currently writing the backend for my app, it has a screen, where you can add or remove websites. The websites have a webProperty predicate.

Data structure:
{
"websiteUserValue": "vespertilian",
"webProperty": [
{
"webPropertyName": "Twitter",
"uid": "0x191ab"
}
],
"uid": "0x191b3"
},
Is there a way when I am updating the list I can add new nodes and delete nodes with the one command?
Currently I believe I have to run a mu.setSetJson to add elements, and a seperate mu.setDeleteJson as part of the same transaction.
It would be nice if I could append metadata and DGraph would just do this as part of one mutation:
Something like this:
where you have a special ___dgraph operator
websites: [
{
uid: "0x235"
__dgraph: {delete: {depth: 1}}
}
{
websiteUserValue: "vespertilian"
webProperty: {
uid: "0x245"
__dgraph: {validatePredicates: ["webPropertyName"]}
}
}
]
What do you think?
This expands upon ideas from my last post:
Thanks
Cam