Sha256: 644d9165059c8d455afdcadc74c5a753458b11579ab78071d1e6140559ed781e

Contents?: true

Size: 528 Bytes

Versions: 16

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Comments
    CommentMutationType = GraphQL::ObjectType.define do
      name "CommentMutation"
      description "A comment which includes its available mutations"

      field :id, !types.ID, "The Comment's unique ID"

      field :upVote, Decidim::Comments::CommentType do
        resolve VoteCommentResolver.new(weight: 1)
      end

      field :downVote, Decidim::Comments::CommentType do
        resolve VoteCommentResolver.new(weight: -1)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
decidim-comments-0.4.3 lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.4.2 lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.4.1 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.4.3 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.4.2 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.4.1 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.4.0 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.4.0 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.3.2 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.3.2 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.3.1 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.3.1 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.3.0 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.3.0 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.2.0 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.2.0 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb