Skip to main content

The mutation type defines GraphQL operations that change data on the server.

In this article

About mutations

Every GraphQL schema has a root type for both queries and mutations. The mutation type defines GraphQL operations that change data on the server. It is analogous to performing HTTP verbs such as POST, PATCH, and DELETE.

For more information, see Forming calls with GraphQL.

abortQueuedMigrations

Clear all of a customer's queued migrations.

Input fields for abortQueuedMigrations

Return fields for abortQueuedMigrations

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

success (Boolean)

Did the operation succeed?.

abortRepositoryMigration

Abort a repository migration queued or in progress.

Input fields for abortRepositoryMigration

Return fields for abortRepositoryMigration

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

success (Boolean)

Did the operation succeed?.

acceptEnterpriseAdministratorInvitation

Accepts a pending invitation for a user to become an administrator of an enterprise.

Input fields for acceptEnterpriseAdministratorInvitation

Return fields for acceptEnterpriseAdministratorInvitation

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

invitation (EnterpriseAdministratorInvitation)

The invitation that was accepted.

message (String)

A message confirming the result of accepting an administrator invitation.

acceptEnterpriseMemberInvitation

Accepts a pending invitation for a user to become an unaffiliated member of an enterprise.

Input fields for acceptEnterpriseMemberInvitation

Return fields for acceptEnterpriseMemberInvitation

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

invitation (EnterpriseMemberInvitation)

The invitation that was accepted.

message (String)

A message confirming the result of accepting an unaffiliated member invitation.

acceptTopicSuggestion

Applies a suggested topic to the repository.

Input fields for acceptTopicSuggestion

Return fields for acceptTopicSuggestion

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

topic (Topic)

The accepted topic.

Warning

topic is deprecated.

Suggested topics are no longer supported Removal on 2024-04-01 UTC.

accessUserNamespaceRepository

Access user namespace repository for a temporary duration.

Input fields for accessUserNamespaceRepository

Return fields for accessUserNamespaceRepository

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

expiresAt (DateTime)

The time that repository access expires at.

repository (Repository)

The repository that is temporarily accessible.

addAssigneesToAssignable

Adds assignees to an assignable object.

Input fields for addAssigneesToAssignable

Return fields for addAssigneesToAssignable

NameDescription

assignable (Assignable)

The item that was assigned.

clientMutationId (String)

A unique identifier for the client performing the mutation.

addBlockedBy

Adds a 'blocked by' relationship to an issue.

Input fields for addBlockedBy

Return fields for addBlockedBy

NameDescription

blockingIssue (Issue)

The issue that is blocking the given issue.

clientMutationId (String)

A unique identifier for the client performing the mutation.

issue (Issue)

The issue that is blocked.

addComment

Adds a comment to an Issue or Pull Request.

Input fields for addComment

Return fields for addComment

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

commentEdge (IssueCommentEdge)

The edge from the subject's comment connection.

subject (Node)

The subject.

timelineEdge (IssueTimelineItemEdge)

The edge from the subject's timeline connection.

addDiscussionComment

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

Input fields for addDiscussionComment

Return fields for addDiscussionComment

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

comment (DiscussionComment)

The newly created discussion comment.

addDiscussionPollVote

Vote for an option in a discussion poll.

Input fields for addDiscussionPollVote

Return fields for addDiscussionPollVote

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pollOption (DiscussionPollOption)

The poll option that a vote was added to.

addEnterpriseOrganizationMember

Adds enterprise members to an organization within the enterprise.

Input fields for addEnterpriseOrganizationMember

Return fields for addEnterpriseOrganizationMember

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

users ([User!])

The users who were added to the organization.

addEnterpriseSupportEntitlement

Adds a support entitlement to an enterprise member.

Input fields for addEnterpriseSupportEntitlement

Return fields for addEnterpriseSupportEntitlement

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

message (String)

A message confirming the result of adding the support entitlement.

addLabelsToLabelable

Adds labels to a labelable object.

Input fields for addLabelsToLabelable

Return fields for addLabelsToLabelable

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

labelable (Labelable)

The item that was labeled.

addProjectCard

Adds a card to a ProjectColumn. Either contentId or note must be provided but not both.

Warning

addProjectCard is deprecated.

Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. Removal on 2025-04-01 UTC.

Input fields for addProjectCard

Return fields for addProjectCard

NameDescription

cardEdge (ProjectCardEdge)

The edge from the ProjectColumn's card connection.

clientMutationId (String)

A unique identifier for the client performing the mutation.

projectColumn (ProjectColumn)

The ProjectColumn.

addProjectColumn

Adds a column to a Project.

Warning

addProjectColumn is deprecated.

Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. Removal on 2025-04-01 UTC.

Input fields for addProjectColumn

Return fields for addProjectColumn

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

columnEdge (ProjectColumnEdge)

The edge from the project's column connection.

project (Project)

The project.

addProjectV2DraftIssue

Creates a new draft issue and add it to a Project.

Input fields for addProjectV2DraftIssue

Return fields for addProjectV2DraftIssue

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

projectItem (ProjectV2Item)

The draft issue added to the project.

addProjectV2ItemById

Links an existing content instance to a Project.

Input fields for addProjectV2ItemById

Return fields for addProjectV2ItemById

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

item (ProjectV2Item)

The item added to the project.

addPullRequestReview

Adds a review to a Pull Request.

Input fields for addPullRequestReview

Return fields for addPullRequestReview

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequestReview (PullRequestReview)

The newly created pull request review.

reviewEdge (PullRequestReviewEdge)

The edge from the pull request's review connection.

addPullRequestReviewComment

Adds a comment to a review.

Input fields for addPullRequestReviewComment

Return fields for addPullRequestReviewComment

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

comment (PullRequestReviewComment)

The newly created comment.

commentEdge (PullRequestReviewCommentEdge)

The edge from the review's comment connection.

addPullRequestReviewThread

Adds a new thread to a pending Pull Request Review.

Input fields for addPullRequestReviewThread

  • input (