1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# frozen_string_literal: true
module Resolvers
class RepositoryBranchNamesResolver < BaseResolver
type ::GraphQL::Types::String, null: false
calls_gitaly!
argument :search_pattern, GraphQL::Types::String,
required: true,
description: 'Pattern to search for branch names by.'
argument :offset, GraphQL::Types::Int,
required: true,
description: 'Number of branch names to skip.'
argument :limit, GraphQL::Types::Int,
required: true,
description: 'Number of branch names to return.'
def resolve(search_pattern:, offset:, limit:)
Repositories::BranchNamesFinder.new(object, offset: offset, limit: limit, search: search_pattern).execute
end
end
end
|