Course lesson
Count the Items in a Collection with a Custom Data Loader
If users will be often querying the number of comments without also querying the list of comments
- Duration
- 1 min
- Access
- Included
- Transcript
- Retained from source evidence
If users will be often querying the number of comments without also querying the list of comments
Then fetching the entire comment collection is wasteful. It's also not compatible with any pagination features that don't return the entire collection.
In this lesson, we will create a custom Data Loader specifically for counting items