Hm, based on what I noticed here is that this works fine in Cond
:
mu := &dgapi.Mutation{
Cond: `@if(not type(Resource) OR eq(count(~resource), 0))`,
SetJson: pb,
}
As for the query, I guess this could work, too (though this doesnt work at all but I guess that’s a different issue):
q1(func: eq(xid, "` + from.Value() + `")) @filter(type(Entity)) {
from as uid
}