Populate both count and some other relation

To populate counts I do this:

          populate: {
            comments: {
              count: true
            },

I generally used array but in this case I don’t know how to populate something else beside it

          populate: {
            comments: {
              count: true
            },
            category: {
             // wont work
            }
1 Like

Same problem here. Any updates?

What versions of Strapi are you using, please?

what about same problem but for many objects, and i want to know count for all ?

Miraculously, ‘count: true’ really works. Why can’t I find any relevant documents? If possible, could you please send me the link?

Solution:

populate: {
          relation1: {populate:true},
          relation2: {count: true}
        }

1 Like