I am using gqlgen to generate boilerplate for graphql queries. How do I generate a resolver for the inner nodes?
For instance, I have a Region schema with [school] array but I also need a filter for the school array. School schema contains classes array which again can be filtered by id. The below query would return all the schools and classes. But as mentioned I also need ability to filter the Schools and Classes in the same query.
type Region {
id: ID!
name: String!
schools: [School!]!
}
type School {
id: ID!
name: String!
classes: [class!]!
}
type Query {
regions(id : ID!): [Region!]!
}