coralproject / talk

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

DSA Notifications #4376

Closed nick-funk closed 10 months ago

nick-funk commented 11 months ago

What does this PR do?

Preliminarily adds notifications to the DSA epic branch.

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?

No.

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

db.notifications.createIndex({ tenantID: 1, id: 1 }, { unique: true });

This index creates the uniqueness constraint for the tenantID and id fields on the notifications collection

db.notifications.createIndex({ tenantID: 1, ownerID: 1, createdAt: 1 });

This index speeds up the retrieval of notifications by tenantID, ownerID, and createdAt which is the most common way of retrieving notifications for pagination in the notifications tab on the stream.

How do I test this PR?

Where any tests migrated to React Testing Library?

No

How do we deploy this PR?