Hello,
I’m trying the last version and I’d like to use an upsert block including a query and a set mutation, but I don’t want to create a new node if my UID function returns nothing.
Here is an example where I want the People (uid=0x6666) to be friend with any People older than 60:
Query:
{
old_people as me(func: gt(age, 60)) {
uid
}
}
Set:
{
"uid": 0x6666,
"friend": { "uid": "uid(old_people)" }
}
The problem is if there is no such old people, dGraph will create an empty node.
Is it possible to disable this behavior, so a set on an empty UID variable does nothing?