Sha256: 921cea4a7f6027c326bdafa8d8137e6e49705da2b5e728bd5a620fd744fa21ba
Contents?: true
Size: 851 Bytes
Versions: 2
Compression:
Stored size: 851 Bytes
Contents
# frozen_string_literal: true module Decidim module Comments # This type represents a comment on a commentable object. CommentType = GraphQL::ObjectType.define do name "Comment" description "A comment" field :id, !types.ID, "The Comment's unique ID" field :body, !types.String, "The comment message" field :createdAt, !types.String, "The creation date of the comment" do property :created_at end field :author, !AuthorType, "The comment's author" field :replies, !types[CommentType], "The comment's replies" field :canHaveReplies, !types.Boolean, "Define if a comment can or not have replies" do property :can_have_replies? end field :alignment, types.Int, "The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'" end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
decidim-comments-0.0.1 | app/types/decidim/comments/comment_type.rb |
decidim-0.0.1 | decidim-comments/app/types/decidim/comments/comment_type.rb |