Sha256: cd1fe92bb7feb24f813aa13853ff52533d5866b68fe28fda334c31e9638467bd

Contents?: true

Size: 527 Bytes

Versions: 15

Compression:

Stored size: 527 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

15 entries across 15 versions & 2 rubygems

Version Path
decidim-comments-0.1.0 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.1.0 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.0.8.1 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.0.8.1 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.0.7 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.0.7 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.0.6 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.0.6 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-comments-0.0.5 lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.0.5 decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb
decidim-0.0.4 decidim-comments/app/types/decidim/comments/comment_mutation_type.rb
decidim-comments-0.0.3 app/types/decidim/comments/comment_mutation_type.rb
decidim-0.0.3 decidim-comments/app/types/decidim/comments/comment_mutation_type.rb
decidim-comments-0.0.2 app/types/decidim/comments/comment_mutation_type.rb
decidim-0.0.2 decidim-comments/app/types/decidim/comments/comment_mutation_type.rb