debian-mirror-gitlab/app/graphql/resolvers/repository_branch_names_resolver.rb

18 lines
438 B
Ruby
Raw Normal View History

2021-04-29 21:17:54 +05:30
# frozen_string_literal: true
module Resolvers
class RepositoryBranchNamesResolver < BaseResolver
type ::GraphQL::STRING_TYPE, null: false
calls_gitaly!
argument :search_pattern, GraphQL::STRING_TYPE,
required: true,
description: 'The pattern to search for branch names by.'
def resolve(search_pattern:)
Repositories::BranchNamesFinder.new(object, search: search_pattern).execute
end
end
end