0

I would like to retrieve the categories of a group, the name and their fields, but with each one the number of entries that have this category assigned.

It's like this question but I'm not using twig templates it is a GraphQL query.

I tried this query but the _count is not working like I want to.

query MyQuery {
  categories(group: "sectors") {
    ... on sectors_Category {
      title
      sectorImage {
        url
      }
      _count(field: "sector")
    }
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.