Taking it from example in docs, the correct syntax to run eq
on multiple arguments is eq( predicate, [val1, val2, val3] )
but this would also work eq( predicate, val1, val2, val3 )
. Shouldn’t this ideally throw?
Query with correct syntax
{
steve as var(func: allofterms(name@en, "Steven")) {
films as count(director.film)
}
stevens(func: uid(steve)) @filter(eq(val(films), [1,2,3])) {
name@en
numFilms : val(films)
}
}
Query with incorrect syntax (which also works)
{
steve as var(func: allofterms(name@en, "Steven")) {
films as count(director.film)
}
stevens(func: uid(steve)) @filter(eq(val(films), 1,2,3 )) {
name@en
numFilms : val(films)
}
}