Skip to main content
Skip to content

Обсуждения

Справочная документация по типам схем GraphQL в категории Обсуждения.

Mutations

addDiscussionComment

Mutation

Adds a comment to a Discussion, possibly as a reply to another comment.

Поля ввода для addDiscussionComment

Возвращаемые поля для addDiscussionComment

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

comment (DiscussionComment)

The newly created discussion comment.

addDiscussionPollVote

Mutation

Vote for an option in a discussion poll.

Поля ввода для addDiscussionPollVote

Возвращаемые поля для addDiscussionPollVote

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

pollOption (DiscussionPollOption)

The poll option that a vote was added to.

addUpvote

Mutation

Add an upvote to a discussion or discussion comment.

Поля ввода для addUpvote

Возвращаемые поля для addUpvote

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

subject (Votable)

The votable subject.

closeDiscussion

Mutation

Close a discussion.

Поля ввода для closeDiscussion

Возвращаемые поля для closeDiscussion

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

discussion (Discussion)

The discussion that was closed.

createDiscussion

Mutation

Create a discussion.

Поля ввода для createDiscussion

Возвращаемые поля для createDiscussion

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

discussion (Discussion)

The discussion that was just created.

deleteDiscussion

Mutation

Delete a discussion and all of its replies.

Поля ввода для deleteDiscussion

Возвращаемые поля для deleteDiscussion

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

discussion (Discussion)

The discussion that was just deleted.

deleteDiscussionComment

Mutation

Delete a discussion comment. If it has replies, wipe it instead.

Поля ввода для deleteDiscussionComment

Возвращаемые поля для deleteDiscussionComment

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

comment (DiscussionComment)

The discussion comment that was just deleted.

markDiscussionCommentAsAnswer

Mutation

Mark a discussion comment as the chosen answer for discussions in an answerable category.

Поля ввода для markDiscussionCommentAsAnswer

Возвращаемые поля для markDiscussionCommentAsAnswer

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

discussion (Discussion)

The discussion that includes the chosen comment.

removeUpvote

Mutation

Remove an upvote to a discussion or discussion comment.

Поля ввода для removeUpvote

Возвращаемые поля для removeUpvote

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

subject (Votable)

The votable subject.

reopenDiscussion

Mutation

Reopen a discussion.

Поля ввода для reopenDiscussion

Возвращаемые поля для reopenDiscussion

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

discussion (Discussion)

The discussion that was reopened.

unmarkDiscussionCommentAsAnswer

Mutation

Unmark a discussion comment as the chosen answer for discussions in an answerable category.

Поля ввода для unmarkDiscussionCommentAsAnswer

Возвращаемые поля для unmarkDiscussionCommentAsAnswer

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

discussion (Discussion)

The discussion that includes the comment.

updateDiscussion

Mutation

Update a discussion.

Поля ввода для updateDiscussion

Возвращаемые поля для updateDiscussion

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

discussion (Discussion)

The modified discussion.

updateDiscussionComment

Mutation

Update the contents of a comment on a Discussion.

Поля ввода для updateDiscussionComment

Возвращаемые поля для updateDiscussionComment

Имя.Description

clientMutationId (String)

A unique identifier for the client performing the mutation.

comment (DiscussionComment)

The modified discussion comment.

Objects

Discussion

Object

A discussion in a repository.

Discussion Реализует

Поля для Discussion

Имя.Description

activeLockReason (LockReason)

Reason that the conversation was locked.

answer (DiscussionComment)

The comment chosen as this discussion's answer, if any.

answerChosenAt (DateTime)

The time when a user chose this discussion's answer, if answered.

answerChosenBy (Actor)

The user who chose this discussion's answer, if answered.

author (Actor)

The actor who authored the discussion.

authorAssociation (CommentAuthorAssociation!)

Author's association with the subject of the comment.

body (String!)

The main text of the discussion post.

bodyHTML (HTML!)

The body rendered to HTML.

bodyText (String!)

The body rendered to text.

category (DiscussionCategory!)

The category for this discussion.

closed (Boolean!)

Indicates if the object is closed (definition of closed may depend on type).

closedAt (DateTime)

Identifies the date and time when the object was closed.

comments (DiscussionCommentConnection!)

The replies to the discussion.

Аргументы для comments

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

createdAt (DateTime!)

Identifies the date and time when the object was created.

createdViaEmail (Boolean!)

Check if this comment was created via an email reply.

databaseId (Int)

Identifies the primary key from the database.

editor (Actor)

The actor who edited the comment.

id (ID!)

The Node ID of the Discussion object.

includesCreatedEdit (Boolean!)

Check if this comment was edited and includes an edit with the creation data.

isAnswered (Boolean)

Only return answered/unanswered discussions.

labels (LabelConnection)

A list of labels associated with the object.

Аргументы для labels

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

  • orderBy (LabelOrder)

    Ordering options for labels returned from the connection.

lastEditedAt (DateTime)

The moment the editor made the last edit.

locked (Boolean!)

true if the object is locked.

number (Int!)

The number identifying this discussion within the repository.

poll (DiscussionPoll)

The poll associated with this discussion, if one exists.

publishedAt (DateTime)

Identifies when the comment was published at.

reactionGroups ([ReactionGroup!])

A list of reactions grouped by content left on the subject.

reactions (ReactionConnection!)

A list of Reactions left on the Issue.

Аргументы для reactions

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

  • orderBy (ReactionOrder)

    Allows specifying the order in which reactions are returned.

repository (Repository!)

The repository associated with this node.

resourcePath (URI!)

The path for this discussion.

stateReason (DiscussionStateReason)

Identifies the reason for the discussion's state.

title (String!)

The title of this discussion.

updatedAt (DateTime!)

Identifies the date and time when the object was last updated.

upvoteCount (Int!)

Number of upvotes that this subject has received.

url (URI!)

The URL for this discussion.

userContentEdits (UserContentEditConnection)

A list of edits to this content.

Аргументы для userContentEdits

  • after (String)

    Returns the elements in the list that come after the specified cursor.

  • before (String)

    Returns the elements in the list that come before the specified cursor.

  • first (Int)

    Returns the first n elements from the list.

  • last (Int)

    Returns the last n elements from the list.

viewerCanClose (Boolean!)

Indicates if the object can be closed by the viewer.

viewerCanDelete (Boolean!)

Check if the current viewer can delete this object.

viewerCanLabel (Boolean!)

Indicates if the viewer can edit labels for this object.

viewerCanReact (Boolean!)

Can user react to this subject.

viewerCanReopen (Boolean!)