Skip to main content

Story

Story is an Article or Page where Comments are written on by Users.

type Story {  id: ID!  status: STORY_STATUS!  url: String!  metadata: StoryMetadata  scrapedAt: Time  featuredComments(    first: Int = 10    orderBy: COMMENT_SORT = "CREATED_AT_DESC"    after: Cursor  ): CommentsConnection!  comments(    first: Int = 20    orderBy: COMMENT_SORT = "CREATED_AT_DESC"    after: Cursor    refreshStream: Boolean    rating: Int = 0    tag: TAG  ): CommentsConnection!  commentActionCounts: ActionCounts!  moderationQueues: ModerationQueues!  closedAt: Time  isClosed: Boolean!  isArchiving: Boolean!  isArchived: Boolean!  isUnarchiving: Boolean!  commentCounts: CommentCounts!  createdAt: Time!  settings: StorySettings!  lastCommentedAt: Time  canModerate: Boolean!  site: Site!  viewerCount: Int  ratings: StoryRatings  viewerRating: Comment  cached: Boolean}

Fields#

id (ID!)#

id is the identifier of the Story.

status (STORY_STATUS!)#

status is the status of the Story.

url (String!)#

url is the url that the Story is located on.

metadata (StoryMetadata)#

metadata stores the scraped metadata from the Story page.

scrapedAt (Time)#

scrapedAt is the Time that the Story had it's metadata scraped at. If the time is null, the Story has not been scraped yet.

featuredComments (CommentsConnection!)#

featuredComments are the Comments with the FEATURED tag on the Story.

comments (CommentsConnection!)#

comments are the comments on the Story.

rating allows filtering for comments with a specific rating. If this feature has not been enabled on this tenant or story, this option has no effect.

This is a workaround to allow filtering for current Q&A functionality. This is used to filter on UNANSWERED to populate its corresponding Unanswered questions tab. In the future, we want a dedicated edge for unansweredComments.

commentActionCounts (ActionCounts!)#

commentActionCounts stores the counts of all the actions against this Story and it's Comments.

moderationQueues (ModerationQueues!)#

moderationQueues returns the set of ModerationQueues that are available for this Story.

closedAt (Time)#

closedAt is the Time that the Story is closed for commenting. If null or in the future, the story is not yet closed.

isClosed (Boolean!)#

isClosed returns true when the Story is currently closed for commenting.

isArchiving (Boolean!)#

isArchiving returns true when the Story is currently in the process of being archived. A story must always be closed (isClosed: true) when it is archiving.

isArchived (Boolean!)#

isArchived returns true when the Story is current archived. A story must always be closed (isClosed: true) when it is archived.

isUnarchiving (Boolean!)#

isUnarchiving returns true when a story is in-between being unarchived and is yet to be fully unarchived.

commentCounts (CommentCounts!)#

commentCounts stores all the counts of Comments that are left on the Comment.

createdAt (Time!)#

createdAt is the date that the Story was created at.

settings (StorySettings!)#

settings is the set of Settings on a Story that inherit from the global settings.

lastCommentedAt (Time)#

lastCommentedAt is the last time someone commented on this story.

canModerate (Boolean!)#

canModerate returns true if the current user can moderate comments on this Story.

site (Site!)#

site is the site associated with the story

viewerCount (Int)#

viewerCount is the number of viewers active on this Story.

ratings (StoryRatings)#

ratings is information about ratings that is attached to this story by published comments.

viewerRating (Comment)#

viewerRating is the Comment with a rating that the viewer has already added to this story.

cached (Boolean)#

cached returns whether a story's stream is currently cached in redis or not.