Running following query on play dgraph instance will have an error output as mentioned below.
curl localhost:8080/query -XPOST -d '
{
steve as var(func: allofterms(name@en, "Stesven")) {
director.film {
fn as name@en
}
}
stevens(func: uid(steve)) {
director.film @filter(eq(name@en, val(fn))){
name@.
}
}
}' | python -m json.tool | less
{
"errors": [
{
"code": "ErrorInvalidRequest",
"message": ": No value found for value variable \"fn\""
}
],
"data": null
}
Whereas if I keep val(fn) in @filter clause as the first argument of eq() it works fine. Is this behaviour intended?