Class: Types::BoardListType

Inherits:
BaseObject
  • Object
show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/graphql/types/board_list_type.rb

Overview

rubocop: disable Graphql/AuthorizeTypes

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from BaseObject

#current_user, #id

Instance Method Details

#issues_countObject


31
32
33
# File 'app/graphql/types/board_list_type.rb', line 31

def issues_count
  [:size]
end

#metadataObject


39
40
41
42
43
44
45
46
47
48
# File 'app/graphql/types/board_list_type.rb', line 39

def 
  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)
      .
  end
end

#total_weightObject


35
36
37
# File 'app/graphql/types/board_list_type.rb', line 35

def total_weight
  [:total_weight]
end