Fix BatchLoader deprecation warnings
<!--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> - [Work on this issue](https://contributors.gitlab.com/manage-issue?action=work&projectId=278964&issueIid=322978) - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=322978) </details> <!--IssueSummary end--> We are now seeing the following deprecation warnings in the ~GraphQL specs: ``` DEPRECATION WARNING: using BatchLoader.for in GraphQL is deprecated. Use BatchLoader::GraphQL.for instead or return BatchLoader::GraphQL.wrap from your resolver. ``` The following locations make use of `BatchLoader.for`: ``` $ git grep BatchLoader.for CHANGELOG.md:- Use BatchLoader for Project.forks_count to limit calls to Redis. !35328 app/models/audit_event.rb: BatchLoader.for(author_id).batch(replace_methods: false) do |author_ids, loader| app/models/blob.rb: BatchLoader.for([commit_id, path]).batch(key: repository) do |items, loader, args| app/models/ci/pipeline.rb: BatchLoader.for(ref).batch do |refs, loader| app/models/ci/pipeline.rb: BatchLoader.for(id).batch(default_value: 0) do |pipeline_ids, loader| app/models/ci/stage.rb: BatchLoader.for(id).batch(default_value: 0) do |stage_ids, loader| app/models/commit.rb: BatchLoader.for({ container: container, oid: oid }).batch(replace_methods: false) do |items, loader| app/models/commit.rb: BatchLoader.for(author_email.downcase).batch do |emails, loader| app/models/concerns/avatarable.rb: BatchLoader.for(identifier: identifier, model: self) app/models/design_management/design_at_version.rb: BatchLoader.for(id).batch do |ids, callback| app/models/discussion.rb: BatchLoader.for(discussion_id).batch do |discussion_ids, loader| app/models/list.rb: BatchLoader.for(list_id: id, user_id: user.id).batch(default_value: preferences.build(user: user)) do |items, loader| app/models/project.rb: BatchLoader.for(self).batch do |projects, loader| app/services/concerns/users/participable_service.rb: BatchLoader.for(user.id).batch do |user_ids, loader| ee/app/models/boards/epic_list.rb: BatchLoader.for(epic_list_id: id, user_id: user.id).batch(default_value: preferences.build(user: user)) do |items, loader| ee/app/models/ee/audit_event.rb: BatchLoader.for(entity_id) ee/app/models/vulnerabilities/finding.rb: BatchLoader.for(project_id: project_id, severity: severity).batch(default_value: 0) do |items, loader| ee/app/models/vulnerabilities/finding.rb: BatchLoader.for(finding_key).batch(replace_methods: false) do |finding_keys, loader| ee/lib/ee/gitlab/background_migration/populate_uuids_for_security_findings.rb: BatchLoader.for(finding_key).batch(replace_methods: false) do |finding_keys, loader| ee/lib/gitlab/path_locks_finder.rb: BatchLoader.for(token).batch do |tokens, loader| lib/api/entities/issuable_entity.rb: BatchLoader.for(object).batch(key: [current_user, :issuable_metadata]) do |models, loader, args| lib/gitlab/background_migration/populate_finding_uuid_for_vulnerability_feedback.rb: BatchLoader.for(finding_key).batch(replace_methods: false) do |finding_keys, loader| lib/gitlab/git/commit.rb: BatchLoader.for(commit_id).batch(key: repository) do |commit_ids, loader, args| lib/gitlab/git/commit.rb: BatchLoader.for(commit_id).batch(key: repository) do |commit_ids, loader, args| lib/gitlab/git/tag.rb: BatchLoader.for(tag_id).batch(key: repository) do |tag_ids, loader, args| lib/gitlab/gpg/commit.rb: BatchLoader.for(@commit.sha).batch do |shas, loader| lib/gitlab/search/found_blob.rb: BatchLoader.for(path).batch(default_value: missing_blob) do |refs, loader| lib/gitlab/x509/commit.rb: BatchLoader.for(@commit.sha).batch do |shas, loader| spec/lib/gitlab/graphql/lazy_spec.rb: BatchLoader.for(key).batch do |keys, loader| spec/lib/gitlab/url_builder_spec.rb: BatchLoader.for(:project).batch do |batch, loader| ``` None of these are are in the main GraphQL source locations, so we should identify where these calls bubble out to GraphQL, and call wrap on them there.
issue