talk
talk copied to clipboard
[CORL-3172]: counts v2 endpoint
trafficstars
What does this PR do?
Adds an endpoint for returning comment count for a story.
TODO:
- [ ] More testing of using Redis cache to store counts
These changes will impact:
- [ ] commenters
- [ ] moderators
- [ ] admins
- [x] developers
What changes to the GraphQL/Database Schema does this PR introduce?
Does this PR introduce any new environment variables or feature flags?
yes - COUNTS_V2
If any indexes were added, were they added to INDEXES.md?
TODO Confirm if we need a new index to handle the aggregation count.
How do I test this PR?
You can request the endpoint with something, like this perhaps:
curl -X POST http://localhost:3000/api/story/counts/v2 -H 'Content-Type: application/json' -d '{"storyIDs": ["STORY_ID"]}'