novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.46k stars 3.51k forks source link

πŸ› Bug Report: HeadlessService.fetchNotifications returns different totalCount than expected #5215

Open lwuethrich-devedis opened 6 months ago

lwuethrich-devedis commented 6 months ago

πŸ“œ Description

I believe the HeadlessService.fetchNotifications returns as totalCountthe number of elements fetched and not the number of total elements.

πŸ‘Ÿ Reproduction steps

  1. Fetch notifications with the HeadlessService.fetchNotifications method, and pass a query limit of 1 -> totalCount= 1
    1. Fetch notifications with the HeadlessService.fetchNotifications method, and pass a different query limit -> totalCountis different (number of data returned)

πŸ‘ Expected behavior

I would expect that totalCount returns the count of all notifications and not only number of returned elements.

πŸ‘Ž Actual Behavior with Screenshots

It seems to return the count of the elements returned in the response.

Novu version

Novu SaaS

npm version

@novu/headless": "0.23.1"

node version

No response

πŸ“ƒ Provide any additional context for the Bug.

No response

πŸ‘€ Have you spent some time to check if this bug has been raised before?

🏒 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

linear[bot] commented 6 months ago

NV-3525 πŸ› Bug Report: HeadlessService.fetchNotifications returns wrong totalCount

Abobos commented 4 months ago

Can I work on this issue? @scopsy