You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: merge_request_type.rb
    path of file: ./repos/gitlabhq/app/graphql/types
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Types
  class MergeRequestType < BaseObject
    graphql_name 'MergeRequest'

    connection_type_class Types::MergeRequestConnectionType

    implements Types::Notes::NoteableInterface
    implements Types::Cur
    
    def user_notes_count
      BatchLoader::GraphQL.for(object.id).batch(key: :merge_request_user_notes_count) do |ids, loader, args|
        counts = Note.count_for_collection(ids, 'MergeRequest').index_by(&:noteable_id)

        ids.each do |id|
          loader.call(id, counts[id]&.count || 0)
        end
      end
    end