[BE] Instance Statistics MVP: Add date constraint parameters to API
Add fromDate
and toDate
parameters to the Instance Statistics GraphQL API to mitigate complex calculations on the frontend to figure out whether to fetch more data and what data to fetch.
Here are some examples of the calculations necessary:
I assume we can't rely on all data points to be present, which will make it hard to calculate the number of items we need to request. I.e. we need to calculate the number of days from the latest received data point until the end date. In fact, we might still receive more data on the final request if there is missing data in the DB (one for each day with missing data). Being able to request with
fromDate
andtoDate
parameters would make this a lot easier!
Source: !43817 (comment 429618497)
Follow-up on #235769 (closed).