Investigate and reduce N+1 SQL issues on commits_without_merge_commits GraphQL field
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=438485) </details> <!--IssueSummary end--> ## Background Based on investigation done on https://gitlab.com/groups/gitlab-org/-/epics/12441#note_1730085427, the `commits_without_merge_commits` field in `GetProjectMergeRequests` query can results to N+1 SQL queries. ## Proposal Investigate and reduce the N+1 SQL queries when `commits_without_merge_commits` is queried.
issue