Skip to content

Increase the page size for the contributions GraphQL query

Adam Hegyi requested to merge 431546-use-500-batch-size-for-ca into master

What does this MR do and why?

This change increases the max page size for the contributions query. Clients may request up to 500 records per page. The main user of this query is the Contribution Analytics feature, where we noticed that large volume of batching (pagination) queries affect the page load significantly: https://gitlab.com/gitlab-com/gitlab-OKRs/-/work_items/4084#note_1644920882

By default, we preserve the default page size (100) for backward compability reason. The frontend controls the page size which is currently behind a feature flag: use_500_page_size_for_contribution_analytics

How to set up and validate locally

  1. Ensure that you're on premium.
  2. Go to a group and visit Analyze > Contribution Analytics
  3. Inspect the GraphQL request and notice that it uses first: null (means: fall back to the default page size.
  4. Enable the use_500_page_size_for_contribution_analytics feature flag.
  5. Not the same request should sent the first: 500 argument.

MR acceptance checklist

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

Related to #431546 (closed)

Edited by Adam Hegyi

Merge request reports