Hi there,
I am not sure if this is a bug or if I am sending an invalid query.
I am sending the following query:
var(func: uid($id))
{
objectives as ~objective_company
{
~keyResult_objective
{
s as startValue
t as targetValue
c as currentValue
diff as math(t - s)
progress as math((c - s) / diff)
}
average as avg(val(progress))
}
}
objectives (func: uid(objectives)) @filter(lt(val(average),0.2) {
numberOfObjectivesAtRisk: count(
}
The query works fine in the following cases:
- The account does not have any objectives
- The account has at least one objective and at least one key result
Otherwise it fails with the error message: Expected a valid value map. But got empty.
I appreciate the help, thanks
Sebastian