Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/resolvers/repository_branch_names_resolver.rb')
-rw-r--r--app/graphql/resolvers/repository_branch_names_resolver.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/graphql/resolvers/repository_branch_names_resolver.rb b/app/graphql/resolvers/repository_branch_names_resolver.rb
new file mode 100644
index 00000000000..45cfe229b2f
--- /dev/null
+++ b/app/graphql/resolvers/repository_branch_names_resolver.rb
@@ -0,0 +1,17 @@
+# 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