Class: Types::WorkItems::Widgets::AwardEmojiType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/work_items/widgets/award_emoji_type.rb

Overview

Disabling widget level authorization as it might be too granular and we already authorize the parent work item rubocop:disable Graphql/AuthorizeTypes

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#downvotesObject



28
29
30
31
# File 'app/graphql/types/work_items/widgets/award_emoji_type.rb', line 28

def downvotes
  BatchLoaders::AwardEmojiVotesBatchLoader
    .load_downvotes(object.work_item, awardable_class: 'Issue')
end

#upvotesObject



33
34
35
36
# File 'app/graphql/types/work_items/widgets/award_emoji_type.rb', line 33

def upvotes
  BatchLoaders::AwardEmojiVotesBatchLoader
    .load_upvotes(object.work_item, awardable_class: 'Issue')
end