No sure about the question, everything you put inside a filter is a function.
You’re right, I created a quick head example. I forgot the syntax details. It’s fixed.
So that I can give you something similar to its structure, you need to provide a valid example (a mutation, to follow your train of thought). What I could do is spend some time creating something similar, but functional. However, you would have to analyze what I created and apply to your model.
Here in the Discuss you have several examples and gists of similar situations.
PS. The approach is similar to this Get started with Dgraph
{
var(func: allofterms(name@en, "Taraji Henson")) {
actor.film {
F as performance.film {
G as genre
}
}
}
Taraji_films_by_genre(func: uid(G)) {
genre_name : name@en
films : ~genre @filter(uid(F)) {
film_name : name@en
}
}
}
Cheers.