Refactor merge request association preloader to be in a SSOT
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
This is based on @hfyngvason's suggestion in https://gitlab.com/gitlab-org/gitlab/-/issues/514744#note_2325818199 about having a SSOT class/module that will include all preloaded associations that we can use in different places. This way, we can re-use it and ensure it applies to all places it is needed.
This should include shared examples or helper methods that can be re-used by consumers.
As of this writing (2025-03-19), there are following preloaders in different locations:
ee/app/finders/ee/merge_requests_finder.rb
ee/app/graphql/resolvers/concerns/ee/resolves_merge_requests.rb
ee/app/models/ee/merge_request.rb
ee/lib/ee/gitlab/ci/variables/preloader/merge_request.rb
- (Upcoming)
ee/lib/ee/gitlab/data_builder/pipeline.rb
Edited by 🤖 GitLab Bot 🤖