I've read the docs and I cannot seem to figure out how to structure my GraphQL for a particular query. For my data I have:
child
|_ school
|_ class
A child has schools and schools have classes, but a child is only assigned to specific classes in a school.
I want to query a specific child to get only the classes they are in.
query={
child(id:$id){
schools{
name
classes{
name
}
}
}
}
I can technically filter the classes while resolving the schools field in the child type by looking deep down the fields but I wanted to clarify that this is still conforming to GraphQL. Should I be placing the classes as a field in the child type instead?