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: versions_resolver.rb
    path of file: ./repos/gitlabhq/app/graphql/resolvers/ci/catalog/resources
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Resolvers
  module Ci
    module Catalog
      module Resources
        class VersionsResolver < BaseResolver
          type Types::Ci::Catalog::Resources::VersionType.connection_type, null: true

          argument :name, GraphQL
    
          def fetch_catalog_resources_versions
            BatchLoader::GraphQL.for(catalog_resource).batch(default_value: []) do |catalog_resources, loader|
              versions = ::Ci::Catalog::Resources::Version.versions_for_catalog_resources(catalog_resources)

              versions.group_by(&:catalog_resource).each do |catalog_resource, resource_versions|
                loader.call(catalog_resource, resource_versions)
              end
            end
          end