Create a custom query to count the number of medias inside a section #11
Labels
API
Issues related to the community API (Strapi, databases, etc.)
enhancement
Issue related to the improvement of an existing feature
help wanted
Extra attention is needed
Strapi not having a real implementation of count using GraphQL I used a workaround to count the number of media inside a library section. I am currently fetching all media ids inside a library section and then get the length of the array containing them.
But the best practice would be to create a custom query returning the library section with a count of the library media as an attribute.
The text was updated successfully, but these errors were encountered: