Skip to content

Update contributions GraphQL API date validation

Adam Hegyi requested to merge ah-update-ca-api-date-range into master

What does this MR do and why?

We plan to rebuild the contribution analytics UI using GraphQL API to retrieve the data (related epic: &9098). The API limits the date range to 1 month which doesn't match the date range on the current UI (maximum 3 months).

This MR updates the API date range to 3 months.

Note: This has some known performance implications, for large groups, querying 3 months of data can lead to DB statement timeouts. We plan to address this concern at a later step when we port groupoptimize features to ClickHouse.

How to set up and validate locally

The query below shouldn't return validation error:

query getIssueCount {
  group(fullPath: "gitlab-org") {
    contributions(from: "2022-01-08", to: "20223-03-01") {
      nodes {
        totalEvents
      }
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading