coralproject / talk

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

[CORL-3105] increase rate limit for flagging comments in API #4552

Closed nick-funk closed 6 months ago

nick-funk commented 6 months ago

What does this PR do?

Adjust the rate limiting for createCommentFlag so it can execute twice as often for the same interval.

These changes will impact:

What changes to the GraphQL/Database Schema does this PR introduce?

Changes the @rate(...) for createCommentFlag from @rate(seconds: 3) to @rate(max: 2, seconds: 3) which increases the max from a default of 1 to 2.

Does this PR introduce any new environment variables or feature flags?

No

If any indexes were added, were they added to INDEXES.md?

N/A

How do I test this PR?

mutation {
    createCommentFlag(input: {
        commentID: "<some-comment-id>",
        commentRevisionID: "<comments-latest-revision-id>",
        reason: COMMENT_REPORTED_OTHER,
        additionalDetails: "additional details",
        clientMutationId: "1"
    }) {
        comment {
            id
        }
    }
}

Were any tests migrated to React Testing Library?

No

How do we deploy this PR?

No special considerations.

netlify[bot] commented 6 months ago

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
Latest commit 8142a28be780a32b81dad100be6bf67ff6d67b07
Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/65d698b07907d80008a76014