# files

```graphql
query Files {
  files {
    data {
      id
      versionId
      path
      type
      size
      sizeBytes
      content
      checksum
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List the files.

## Arguments

| Name               | Type          | Required | Description                                                                                                     |
| ------------------ | ------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `projectReference` | String        |          | Project ID or slug. Omit to use the current project context.                                                    |
| `ref`              | String        |          | Content selector; omit to preserve the current content context.                                                 |
| `branch`           | String        |          | Branch name or ID alias for ref; conflicting aliases are rejected.                                              |
| `branchId`         | String        |          | Legacy branch ID alias; omit to preserve the current context.                                                   |
| `limit`            | Int           |          |                                                                                                                 |
| `cursor`           | String        |          |                                                                                                                 |
| `sortBy`           | FileSortBy    |          | Field to sort by. Tied update times break by path ascending. Default `updated_at`. One of `path`, `updated_at`. |
| `sortOrder`        | FileSortOrder |          | Sort direction. Default `desc`. One of `asc`, `desc`.                                                           |

## Responses

| Status | Description                        |
| ------ | ---------------------------------- |
| 200    | The FilesConnection in data.files. |

## 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 Files {\n  files {\n    data {\n      id\n      versionId\n      path\n      type\n      size\n      sizeBytes\n      content\n      checksum\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}"
}'
```

## Example response

```json
{
  "data": {
    "files": {
      "data": [
        {
          "id": "string",
          "versionId": "string",
          "path": "string",
          "type": "string",
          "size": 0,
          "sizeBytes": 0,
          "content": "string",
          "checksum": "string",
          "createdAt": "2026-01-01T00:00:00Z",
          "updatedAt": "2026-01-01T00:00:00Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
