Commit 967762f7 authored by Sean Arnold's avatar Sean Arnold

Move resolver_complexity method to module

parent a3e72ac4
...@@ -48,4 +48,13 @@ module IssueResolverFields ...@@ -48,4 +48,13 @@ module IssueResolverFields
description: 'Filter issues by the given issue types', description: 'Filter issues by the given issue types',
required: false required: false
end end
class_methods do
def resolver_complexity(args, child_complexity:)
complexity = super
complexity += 2 if args[:labelName]
complexity
end
end
end end
...@@ -42,13 +42,6 @@ module Resolvers ...@@ -42,13 +42,6 @@ module Resolvers
end end
end end
def self.resolver_complexity(args, child_complexity:)
complexity = super
complexity += 2 if args[:labelName]
complexity
end
def non_stable_cursor_sort?(sort) def non_stable_cursor_sort?(sort)
NON_STABLE_CURSOR_SORTS.include?(sort) NON_STABLE_CURSOR_SORTS.include?(sort)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment