It would be great if to be able to add the sectionType/entryType to the query.
Usecase
We have a "Tag" entry type that is used through multiple section types (newsArticle, product etc).
Now on the News Overview page I would like to render the tags that are used by newsArticles only and show a count (how many articles use Tag X).
currently i would get a count of the usage of the tag throughout all types.
Example
{
entries(type:"tag") {
... on tag_Entry {
title
# this would only count relations of sectionType "newsArticles"
relationsField(section:"newsArticles") {
count
isInUse
elements(limit: 2) {
id
title
}
globalCount: count(siteIds: []),
globalIsInUse: isInUse(siteIds: []),
globalElements: elements(siteIds: [], limit:2) {
id
title
}
}
}
}
}
It would be great if to be able to add the sectionType/entryType to the query.
Usecase
We have a "Tag" entry type that is used through multiple section types (newsArticle, product etc).
Now on the News Overview page I would like to render the tags that are used by newsArticles only and show a count (how many articles use Tag X).
currently i would get a count of the usage of the tag throughout all types.
Example
{ entries(type:"tag") { ... on tag_Entry { title # this would only count relations of sectionType "newsArticles" relationsField(section:"newsArticles") { count isInUse elements(limit: 2) { id title } globalCount: count(siteIds: []), globalIsInUse: isInUse(siteIds: []), globalElements: elements(siteIds: [], limit:2) { id title } } } } }