Query Subitems from all items and all boards

I want to query all subitems available in my account, Since I can not directly query subitems so right now I am doing like this
{"query":"{items(page:1) {id name subitems{id name subscribers{id name} }}}"}
but the problem with this query is it will return all the items even if there is no subitems in that item, and due to pagination I need to fire this request for all the items, Is there any way that I can get only items which has subitems so that I can stop unnecessary API requests?

Hello @amit.yadav and welcome to the community!

I hope you like it here :muscle:

As of today there is no way of querying only items which have subitems in them.

You will have to query the items and then check if they have subitems or not on your end.

Let me know if you have any other questions :slightly_smiling_face:

Cheers,
Matias