Return custom values in query result

I would like to return a custom info if some conditions are meeted.
Example


{
     user_found: true
}

Is this possible ?

Nope, we don’t support custom fields. But you can use “math()” func to check and return a boolean.

cond(a, b, c) first operand must be a boolean selects b if a is true else c

More about it https://docs.dgraph.io/query-language/#math-on-value-variables

1 Like