Class: Types::BoardListType
Overview
rubocop: disable Graphql/AuthorizeTypes
Instance Method Summary
collapse
#clear_memoization, #strong_memoize, #strong_memoized?
Methods inherited from BaseObject
#current_user, #id
Instance Method Details
#issues_count ⇒ Object
31
32
33
|
# File 'app/graphql/types/board_list_type.rb', line 31
def issues_count
metadata[:size]
end
|
39
40
41
42
43
44
45
46
47
48
|
# File 'app/graphql/types/board_list_type.rb', line 39
def metadata
strong_memoize(:metadata) do
list = self.object
user = context[:current_user]
::Boards::Issues::ListService
.new(list.board.resource_parent, user, board_id: list.board_id, id: list.id)
.metadata
end
end
|
#total_weight ⇒ Object
35
36
37
|
# File 'app/graphql/types/board_list_type.rb', line 35
def total_weight
metadata[:total_weight]
end
|