diff options
Diffstat (limited to 'app/graphql/resolvers/concerns')
-rw-r--r-- | app/graphql/resolvers/concerns/issues/look_ahead_preloads.rb | 8 | ||||
-rw-r--r-- | app/graphql/resolvers/concerns/resolves_merge_requests.rb | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/app/graphql/resolvers/concerns/issues/look_ahead_preloads.rb b/app/graphql/resolvers/concerns/issues/look_ahead_preloads.rb index 2ea7a02bf15..d9bcf39b818 100644 --- a/app/graphql/resolvers/concerns/issues/look_ahead_preloads.rb +++ b/app/graphql/resolvers/concerns/issues/look_ahead_preloads.rb @@ -20,17 +20,15 @@ module Issues end def preloads - preload_hash = { + { alert_management_alert: [:alert_management_alert], assignees: [:assignees], participants: Issue.participant_includes, timelogs: [:timelogs], customer_relations_contacts: { customer_relations_contacts: [:group] }, - escalation_status: [:incident_management_issuable_escalation_status] + escalation_status: [:incident_management_issuable_escalation_status], + type: :work_item_type } - preload_hash[:type] = :work_item_type if Feature.enabled?(:issue_type_uses_work_item_types_table) - - preload_hash end end end diff --git a/app/graphql/resolvers/concerns/resolves_merge_requests.rb b/app/graphql/resolvers/concerns/resolves_merge_requests.rb index b9326015ac0..c0a068097a7 100644 --- a/app/graphql/resolvers/concerns/resolves_merge_requests.rb +++ b/app/graphql/resolvers/concerns/resolves_merge_requests.rb @@ -11,6 +11,11 @@ module ResolvesMergeRequests end def resolve_with_lookahead(**args) + if args[:group_id] + args[:group_id] = ::GitlabSchema.parse_gid(args[:group_id], expected_type: ::Group).model_id + args[:include_subgroups] = true + end + mr_finder = MergeRequestsFinder.new(current_user, args.compact) finder = Gitlab::Graphql::Loaders::IssuableLoader.new(mr_parent, mr_finder) |