Filtering at nested levels is not currently possible. That would require either:
- Allow @resolver directive in user-defined types’ fields, or
- Filtering in autogenerated GraphQL queries
This is indeed unfortunate – the query that you show is the most idiomatic thing to do in GraphQL. The two feature requests I linked to are on the roadmap, but they are behind other features that should be landing soon. Until then the best workaround is to use a UDF to resolve the relationships and filters in one step. I believe that this is what you are doing in this post: How to handle deletedAt in Graphql and faunadb? - #5 by aprilmintacpineda
{
getUserGoals {
data {
name
deletedAt
}
}
}