Delete branch

deleteBranch(input: DeleteBranchInput!): DeleteBranchPayload!

Requires project.files.write; API keys also need delete scope.

Arguments

ArgumentTypeRequired
inputDeleteBranchInput!Yes

Input fields

input

DeleteBranchInput

FieldTypeRequiredDescription
branchIdID!YesBranch to delete. Only a branch with a base branch can be deleted, excluding main. Its associated content is removed.

Response

Returns DeleteBranchPayload!. Open the type for its fields and nested types.

FieldTypeDescription
okBoolean!Always true: the branch was deleted.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation DeleteBranch($input: DeleteBranchInput!) {
  deleteBranch(input: $input) {
    ok
  }
}
json
{
  "input": {
    "branchId": "00000000-0000-4000-8000-000000000001"
  }
}