Skip to main content

Comment

Comment is a comment left by a User on an Story or another Comment as a reply.

type Comment {  id: ID!  body: String  revision: CommentRevision  revisionHistory: [CommentRevision!]!  createdAt: Time!  author: User  status: COMMENT_STATUS!  statusHistory(    first: Int = 10    after: Cursor  ): CommentModerationActionConnection!  parentCount: Int!  depth: Int!  replyCount: Int!  replies(    first: Int = 10    orderBy: COMMENT_SORT = "CREATED_AT_DESC"    after: Cursor    flatten: Boolean  ): CommentsConnection!  parent: Comment  rootParent: Comment  parents(last: Int = 1, before: Cursor): CommentsConnection!  editing: EditInfo!  actionCounts: ActionCounts!  reactions(first: Int = 10, after: Cursor): ReactionsConnection!  flags(first: Int = 10, after: Cursor): FlagsConnection!  viewerActionPresence: ActionPresence  story: Story!  permalink: String!  tags: [Tag!]!  deleted: Boolean  canModerate: Boolean!  site: Site!  rating: Int}

Fields#

id (ID!)#

id is the identifier of the Comment.

body (String)#

body is the content of the Comment, and is an alias to the body of the revision.body.

revision (CommentRevision)#

revision is the current revision of the Comment's body.

revisionHistory ([CommentRevision!]!)#

revisionHistory stores the previous CommentRevision's, with the most recent edit last.

createdAt (Time!)#

createdAt is the date in which the Comment was created.

author (User)#

author is the User that authored the Comment.

status (COMMENT_STATUS!)#

status represents the Comment's current status.

statusHistory (CommentModerationActionConnection!)#

statusHistory returns a CommentModerationActionConnection that will list the history of moderator actions performed on the Comment, with the most recent last.

parentCount (Int!)#

parentCount is the number of direct parents for this Comment. Currently this value is the same as depth.

depth (Int!)#

depth is the number of levels that a given comment is deep.

replyCount (Int!)#

replyCount is the number of replies. Only direct replies to this Comment are counted. Removed comments are included in this count.

replies (CommentsConnection!)#

replies will return the replies to this Comment.

parent (Comment)#

parent is the immediate parent of a given comment.

rootParent (Comment)#

rootParent is the highest level parent Comment. This Comment would have been left on the Story itself.

parents (CommentsConnection!)#

parents returns a CommentsConnection that allows accessing direct parents of the given Comment.

editing (EditInfo!)#

editing returns details about the edit status of a Comment.

actionCounts (ActionCounts!)#

actionCounts stores the counts of all the actions for the Comment.

reactions (ReactionsConnection!)#

reactions is the actual Flags that were left by the Users or the system.

flags (FlagsConnection!)#

flags is the actual Flags that were left by the Users or the system.

viewerActionPresence (ActionPresence)#

viewerActionPresence stores the presence information for all the actions left by the current User on this Comment.

story (Story!)#

story is the Story that the Comment was written on.

permalink (String!)#

The permalink for this comment.

tags ([Tag!]!)#

tags are the list of tags assigned to the Comment.

deleted (Boolean)#

deleted is whether the comment has been deleted.

canModerate (Boolean!)#

canModerate returns true if the current user can moderate this Comment.

site (Site!)#

site is the Site referenced by the Story for this Comment.

rating (Int)#

rating is the optional rating that is attached to the Comment.