List draft files

draftFiles(input: ListDraftFilesInput!): [DraftFile!]!

Requires project.files.read.

Arguments

ArgumentTypeRequired
inputListDraftFilesInput!Yes

Input fields

input

ListDraftFilesInput

FieldTypeRequiredDescription
projectReferenceStringNoProject whose pending drafts are selected. Returns one latest update per canonically visible source file; restricted server-function drafts are omitted.
branchIdIDNo
entityTypeDraftEntityTypeNoFilter pending drafts by their actual source-file type.
branchReferenceStringNoBranch name or UUID. Conflicting branchId aliases are rejected; omit/null for main.

Response

Returns [DraftFile!]!. Open the type for its fields and nested types.

FieldTypeDescription
entityIdID!
entityTypeDraftEntityType!Actual source-file type.
bodySnapshotStringNullable full-body snapshot, including deletions.
versionInt!Current draft sequence.
updatedAtDateTime

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

Example

graphql
query DraftFiles($input: ListDraftFilesInput!) {
  draftFiles(input: $input) {
    updatedAt
    bodySnapshot
    entityId
    entityType
    version
  }
}
json
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001"
  }
}