Lets have this query:
query test {
entries(section: "vacancies") {
title
... on vacancies_vacancies_Entry {
description
organisation {
title
... on organisations_organisations_Entry {
organisationType
}
}
}
}
}
Now how would I go about only displaying vacancies from an organisation that has a specific organisationType . I've had a quick read through graphQl docs and couldn't find anything that could help.
I guess I can first query organisations, get their IDs and then pass it to relatedTo parameter to another query, but that's 2 API requests each time I want to make a query. Is it possible to somehow use one graphQL query as a parameter in another graphQl query? Are there any better solutions to this?