diff options
Diffstat (limited to 'app/graphql/resolvers/projects/branch_rules_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/projects/branch_rules_resolver.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/graphql/resolvers/projects/branch_rules_resolver.rb b/app/graphql/resolvers/projects/branch_rules_resolver.rb new file mode 100644 index 00000000000..6c8b416bcea --- /dev/null +++ b/app/graphql/resolvers/projects/branch_rules_resolver.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Resolvers + module Projects + class BranchRulesResolver < BaseResolver + type Types::Projects::BranchRuleType.connection_type, null: false + + alias_method :project, :object + + def resolve(**args) + project.protected_branches + end + end + end +end |