GraphQL root count on cascaded filtered child query

Hi, everyone! :slight_smile:

I’d just like to ask one question. Is it possible to get the root count with cascade after filtering the child nodes? For example:

querySomething(first: 5, offset: 0, filter: {name:{eq: "foo"}}) @cascade {
    name
    department (filter: {department: {eq: "accounting"}}) {
        department
    }
}

Result:

"querySomething": [
{
    "name": "accountant1",
    "department": {
        "department": "accounting"
    }
},
{
    "name": "accountant2",
    "department": {
        "department": "accounting"
    }
},
// other 3 outputs here
],
"rootQueryCount": {
    "count": 100 // out of 500
}

You need Custom DQL for that.

J