Load full MR reviewer and assignee set in sidebar
What does this MR do and why?
An MR can persist up to 200 reviewers (and assignees), but the reviewers and
assignees connection fields on MergeRequestType inherited the schema-wide
default_max_page_size of 100. The sidebar widget loaded only the first 100 and,
on any save, overwrote the MR's full reviewer set with what it held in memory,
silently removing every reviewer past the first 100 with no warning.
This sets both fields' max_page_size to the backend limit constant
(Issuable::MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS) so the GraphQL cap matches the
persistence limit and cannot drift from it. That drift is what caused the bug:
the limit was raised from 100 to 200 in 15.9 but the page-size cap was never
updated. Using the constant, rather than a literal, keeps the two in lockstep.
Clients that select these fields without an explicit first: now load the full
set through this single cap (the connection resolves its limit as
min(first, last, max_page_size), which falls through to max_page_size when no
first: is given), so no query needs to hardcode the limit.
This is part 1 of a decomposed fix. Part 1 closes the current data-loss window. A follow-up will switch the sidebar to delta (append/remove) mutations so a single-reviewer edit can never reconcile against a truncated client list, removing the failure mode independent of the page-size cap.
| Part | Purpose | MR |
|---|---|---|
| 1 | Cap reviewer/assignee page size at the backend limit | |
| 2 | Switch sidebar to delta (append/remove) mutations | follow-up |
References
Resolves #606591
Related:
- #547908 (closed) (root-cause model raised June 2025)
- #366485 (closed) (raised the backend limit 100 to 200)
- !99163 (merged) (implemented that increase)
Screenshots or screen recordings
No visible UI change; this changes a GraphQL field's page-size cap.
How to set up and validate locally
- Create an MR and add more than 100 reviewers (the REST reviewers endpoint permits up to 200).
- Before this change, the sidebar reviewer widget shows only 100.
- With this change, open the MR sidebar: it loads the full reviewer set.
- Add one more reviewer and save; confirm no previously-assigned reviewer is dropped.
Automated coverage:
spec/graphql/types/merge_request_type_spec.rbasserts both fields'max_page_sizeequals the backend constant.spec/requests/api/graphql/project/merge_request_spec.rbloads an MR with more reviewers thandefault_max_page_sizeand asserts they are all returned.