Decidim 0.28.4

decidim.barcelona API documentation

Explore the API interactively with GraphiQL

Comment

A comment

Implements

Fields

author (Author!)

The resource author

id (ID!)

The Comment's unique ID

sgid (String!)

The Comment's signed global id

body (String!)

The comment message

formattedBody (String!)

The comment message ready to display (it is expected to include HTML)

createdAt (String!)

The creation date of the comment

formattedCreatedAt (String!)

The creation date of the comment in relative format

alignment (Int)

The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'

upVotes (Int!)

The number of comment's upVotes

upVoted (Boolean!)

Check if the current user has upvoted the comment

downVotes (Int!)

The number of comment's downVotes

downVoted (Boolean!)

Check if the current user has downvoted the comment

hasComments (Boolean!)

Check if the commentable has comments

alreadyReported (Boolean!)

Check if the current user has reported the comment

userAllowedToComment (Boolean!)

Check if the current user can comment

type (String!)

The commentable's class name. i.e. Decidim::ParticipatoryProcess

acceptsNewComments (Boolean!)

Whether the object can have new comments or not

commentsHaveAlignment (Boolean!)

Whether the object comments have alignment or not

commentsHaveVotes (Boolean!)

Whether the object comments have votes or not

comments ([Comment!]!)
Argument Type Description
orderBy String

Order the comments

singleCommentId String

ID of the single comment to look at

totalCommentsCount (Int!)

The number of comments in all levels this resource holds