diff options
Diffstat (limited to 'app/graphql/resolvers/issues_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/issues_resolver.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/app/graphql/resolvers/issues_resolver.rb b/app/graphql/resolvers/issues_resolver.rb index e2874f6643c..396ae02ae13 100644 --- a/app/graphql/resolvers/issues_resolver.rb +++ b/app/graphql/resolvers/issues_resolver.rb @@ -2,7 +2,7 @@ module Resolvers class IssuesResolver < BaseResolver - prepend IssueResolverFields + prepend IssueResolverArguments argument :state, Types::IssuableStateEnum, required: false, @@ -19,7 +19,7 @@ module Resolvers milestone_due_asc milestone_due_desc].freeze def continue_issue_resolve(parent, finder, **args) - issues = Gitlab::Graphql::Loaders::IssuableLoader.new(parent, finder).batching_find_all + issues = apply_lookahead(Gitlab::Graphql::Loaders::IssuableLoader.new(parent, finder).batching_find_all) if non_stable_cursor_sort?(args[:sort]) # Certain complex sorts are not supported by the stable cursor pagination yet. @@ -30,6 +30,16 @@ module Resolvers end end + private + + def preloads + { + alert_management_alert: [:alert_management_alert], + labels: [:labels], + assignees: [:assignees] + } + end + def non_stable_cursor_sort?(sort) NON_STABLE_CURSOR_SORTS.include?(sort) end |