Is it possible to filter documents by their linked documents custom field value? For example, i want to get all team members filtered by the location name "Hamburg".
{
allTeam_members {
edges {
node {
id
name
location {
... on Locations {
name
_meta {
uid
}
}
}
}
}
}
}
It is not possible to use the field of a linked document as an argument for filtering the response. These fields need to belong to the main document you’re querying (In this case would be “team_members”).
I don’t know how your locations Custom type is built but if it’s similar to a tag, then a Custom Tagging System is what you need.
After creating a custom Tag, you can then create a document and add the “Hamburg” text to it. Then in a query, you’ll just need to do a query by Content relationship field and pass the ID of the “Hamburg” custom tag.