MichelDiz commented :
It seems reasonable to me. Value variables could come from other blocks and amplify the possibilities of querying.
{
AB as var(func: anyofterms(name, "Alice Bob Charlie")) {
value as math(5)
}
q(func: uid(AB)) {
rated @facets @facets(eq(rating, val(value))) {
uid
}
}
}
Update(2021): just fixed the query.