# draftContent

```graphql
query DraftContent($input: GetDraftContentInput!) {
  draftContent(input: $input) {
    entityId
    entityType
    body
    version
    updatedAt
  }
}
```

Return draft content. Requires project.files.read.

## Arguments

| Name                     | Type                  | Required | Description                                                                                                                   |
| ------------------------ | --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `input`                  | GetDraftContentInput! | Yes      |                                                                                                                               |
| `input.projectReference` | String                |          |                                                                                                                               |
| `input.entityId`         | ID!                   | Yes      | Source-file path or UUID. Missing drafts return null; restricted server-function source is denied or omitted when unreadable. |
| `input.entityType`       | DraftEntityType!      | Yes      | Legacy entity-type hint. One of `page`, `component`, `function`, `virtual_file`.                                              |
| `input.branchId`         | ID                    |          |                                                                                                                               |
| `input.branchReference`  | String                |          | Branch name or UUID. Conflicting branchId aliases are rejected; omit/null for main.                                           |

## Variables

```json
{
  "input": {
    "entityId": "string",
    "entityType": "page"
  }
}
```

## Responses

| Status | Description                            |
| ------ | -------------------------------------- |
| 200    | The DraftContent in data.draftContent. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query DraftContent($input: GetDraftContentInput!) {\n  draftContent(input: $input) {\n    entityId\n    entityType\n    body\n    version\n    updatedAt\n  }\n}",
  "variables": {
    "input": {
      "entityId": "string",
      "entityType": "page"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "draftContent": {
      "entityId": "string",
      "entityType": "page",
      "body": "string",
      "version": 0,
      "updatedAt": "2026-01-01T00:00:00Z"
    }
  }
}
```
