is there a way that I can bring all the education details of a student by querying on education and filtering on user internally
query{
queryEducation{
id
collegeName #These education details should be of below user ID
degree
startYear
endYear
user(filter:{id:"#Some User ID"}){
id
name
}
}
}
Yes. You can definitely filter internal nodes if they match any of the following properties :
The field being filtered is of object type ID or has an id directive succeeding it
The field that is to be filtered has a search directive succeeding it
However that isn’t always the best way to filter through subfields. In your schema, since you are querying on education first, the n-th subfilter might not exist ( leading to a null return, since not all Education objects will have a common student to them). A better schema would be as follows: