Commit 491094c6 authored by Alex Kalderimis's avatar Alex Kalderimis

General improvements to board lists resolver

parent 5a8f41fb
......@@ -28,7 +28,7 @@ module Resolvers
context.scoped_set!(:issue_filters, issue_filters(issue_filters))
if load_preferences?(lookahead)
List.preload_preferences_for_user(lists, context[:current_user])
List.preload_preferences_for_user(lists, current_user)
end
offset_pagination(lists)
......@@ -39,7 +39,7 @@ module Resolvers
def board_lists(id)
service = ::Boards::Lists::ListService.new(
board.resource_parent,
context[:current_user],
current_user,
list_id: extract_list_id(id)
)
......@@ -47,7 +47,8 @@ module Resolvers
end
def load_preferences?(lookahead)
lookahead&.selection(:edges)&.selection(:node)&.selects?(:collapsed)
lookahead&.selection(:edges)&.selection(:node)&.selects?(:collapsed) ||
lookahead&.selection(:nodes)&.selects?(:collapsed)
end
def extract_list_id(gid)
......
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