diff options
Diffstat (limited to 'app/graphql/resolvers/projects/branch_rules_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/projects/branch_rules_resolver.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/graphql/resolvers/projects/branch_rules_resolver.rb b/app/graphql/resolvers/projects/branch_rules_resolver.rb index 6c8b416bcea..e99d7ae4d5f 100644 --- a/app/graphql/resolvers/projects/branch_rules_resolver.rb +++ b/app/graphql/resolvers/projects/branch_rules_resolver.rb @@ -3,13 +3,17 @@ module Resolvers module Projects class BranchRulesResolver < BaseResolver + include LooksAhead + type Types::Projects::BranchRuleType.connection_type, null: false alias_method :project, :object - def resolve(**args) - project.protected_branches + def resolve_with_lookahead(**args) + apply_lookahead(project.protected_branches) end end end end + +Resolvers::Projects::BranchRulesResolver.prepend_mod_with('Resolvers::Projects::BranchRulesResolver') |