Class: Decidim::Comments::CommentMutationType

Inherits:
Api::Types::BaseObject show all
Defined in:
decidim-comments/lib/decidim/api/comment_mutation_type.rb

Instance Method Summary collapse

Instance Method Details

#down_vote(args: {}) ⇒ Object


17
18
19
# File 'decidim-comments/lib/decidim/api/comment_mutation_type.rb', line 17

def down_vote(args: {})
  VoteCommentResolver.new(weight: -1).call(object, args, context)
end

#up_vote(args: {}) ⇒ Object


12
13
14
# File 'decidim-comments/lib/decidim/api/comment_mutation_type.rb', line 12

def up_vote(args: {})
  VoteCommentResolver.new(weight: 1).call(object, args, context)
end