Commit draft content

commitDraftContent(input: CommitDraftContentInput!): CommitDraftContentPayload!

Requires project.files.write.

Arguments

ArgumentTypeRequired
inputCommitDraftContentInput!Yes

Input fields

input

CommitDraftContentInput

FieldTypeRequiredDescription
projectReferenceStringNo
entityIdID!YesSource-file path or UUID to commit to one immutable content version.
entityTypeDraftEntityType!Yes
branchIdIDNo
expectedVersionIdIDNoExpected persisted version UUID. Stale preconditions are GraphQL concurrency errors.

Response

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

FieldTypeDescription
successBoolean!
entityIdID!
entityTypeDraftEntityType!
bodyLengthInt!Committed body length in UTF-16 code units.
updatedAtDateTime!Timestamp from the immutable content version.
versionIdIDID of the immutable content version.

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

Example

graphql
mutation CommitDraftContent($input: CommitDraftContentInput!) {
  commitDraftContent(input: $input) {
    updatedAt
    bodyLength
    entityId
    entityType
    success
  }
}
json
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001",
    "entityId": "00000000-0000-4000-8000-000000000001",
    "entityType": "page"
  }
}