For example I have a upsert operation like this,
upsert{
query{
k as var(func: eq(predicate, <string>)){
A as price
}
var(){
changed_value as math(a - 50)
}
}
mutation @if(gt(changed_value, 0)){
set{
uid(k) <predicate> changed_value .
}
}
}
When try to use the created variable from the query part for assigning a value to a predicate in the mutation part I get an error
{
"name": "t",
"url": "http://localhost:8080/mutate?commitNow=true",
"errors": [
{
"message": "while lexing uid(k) <predicate> changed_quantity . at line 1 column 25: Invalid input: c at lexText",
"extensions": {
"code": "ErrorInvalidRequest"
}
}
]
}
Should one not use a variable for assigning values to a predicate ?