coralproject / talk

A better commenting experience from Vox Media
https://coralproject.net
Other
1.88k stars 355 forks source link

[CORL-3172]: counts v2 endpoint #4635

Open kabeaty opened 1 month ago

kabeaty commented 1 month ago

What does this PR do?

Adds an endpoint for returning comment count for a story.

TODO:

These changes will impact:

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"]}'

Were any tests migrated to React Testing Library?

How do we deploy this PR?

netlify[bot] commented 1 month ago

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
Latest commit 9cd9f000186e19d130d5d9e96e3cf1ac44b05465
Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/6675af15cd502500092f4039