Problem with nested graphql query

I found the solution: I have to filter the subquery.

query allArticleCategories {
  articleCategories(sort: "title:asc", where: { active: true }) {
    id
    title
    slug
    articles(where: { status: "published" }) {
        id
        title
        slug
        status
    }
  }
}