summaryrefslogtreecommitdiff
path: root/app/graphql/resolvers/issues_resolver.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/resolvers/issues_resolver.rb')
-rw-r--r--app/graphql/resolvers/issues_resolver.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/graphql/resolvers/issues_resolver.rb b/app/graphql/resolvers/issues_resolver.rb
index ae27cce9113..ac3bdda0f12 100644
--- a/app/graphql/resolvers/issues_resolver.rb
+++ b/app/graphql/resolvers/issues_resolver.rb
@@ -6,9 +6,9 @@ module Resolvers
argument :state, Types::IssuableStateEnum,
required: false,
- description: 'Current state of this issue'
+ description: 'Current state of this issue.'
argument :sort, Types::IssueSortEnum,
- description: 'Sort issues by this criteria',
+ description: 'Sort issues by this criteria.',
required: false,
default_value: :created_desc
@@ -19,7 +19,7 @@ module Resolvers
milestone_due_asc milestone_due_desc].freeze
def continue_issue_resolve(parent, finder, **args)
- issues = apply_lookahead(Gitlab::Graphql::Loaders::IssuableLoader.new(parent, finder).batching_find_all)
+ issues = Gitlab::Graphql::Loaders::IssuableLoader.new(parent, finder).batching_find_all { |q| apply_lookahead(q) }
if non_stable_cursor_sort?(args[:sort])
# Certain complex sorts are not supported by the stable cursor pagination yet.
@@ -32,6 +32,14 @@ module Resolvers
private
+ def unconditional_includes
+ [
+ {
+ project: [:project_feature]
+ }
+ ]
+ end
+
def preloads
{
alert_management_alert: [:alert_management_alert],