Create branch

createBranch(input: CreateBranchInput!): Branch!

Requires project.files.write.

Arguments

ArgumentTypeRequired
inputCreateBranchInput!Yes

Input fields

input

CreateBranchInput

FieldTypeRequiredDescription
projectReferenceStringNo
nameString!Yes
baseBranchIdIDNo
descriptionStringNo
autoDeleteOnMergeBooleanNoDelete the branch after merge. Null and omission use the false default.

Response

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

FieldType
idID!
projectIdID!
nameString!
baseBranchIdID
createdAtString!
createdByID
mergedAtString
mergedByID

All fields of Branch.

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

Example

graphql
mutation CreateBranch($input: CreateBranchInput!) {
  createBranch(input: $input) {
    id
    projectId
    name
    status
    createdAt
  }
}
json
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001",
    "name": "example"
  }
}