Hi!
I’ve tried to insert @if directive into mutation section, for example
mutationAddUnit = `
@if(eq(dateAdd,0)) {
uid(uidValue) <name> "%UNIT%" .
uid(uidValue) <unit> "%UNIT%" .
uid(uidValue) <dateAdd> "%DATEADD%" .
uid(uidValue) <dgraph.type> "unit" .
}
`
But always get syntax error:
rpc error: code = Unknown desc = while lexing @if(eq(dateAdd, 0)) { at line 1 column 0: Invalid input: @ at lexText
or
rpc error: code = Unknown desc = while lexing @if(eq(dateAdd, 0)) { at line 1 column 0: Invalid input: @ at lexText