Could someone help me please with this question? I have read that GraphQL doesn’t support Count, like the one in DQL?
How do you guys query the count of a type with GraphQL then? I only need the count of a type, it takes too long to query all the ids of the nodes and do a result.length in the front-end.
Use the aggregate queries. Something like:
I think this was added in 20.07 if I remember correctly. So anything you read dated prior to July 2020 will not reflect that counts are now available.
Thanks, that works! Would be great if they added that to the documentation, couldn’t find anything in the GraphQL docs.
Appreciate your help!