# listFileChunks

```graphql
query ListFileChunks($input: ListFileChunksInput!) {
  listFileChunks(input: $input) {
    chunks {
      id
      index
      content
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List file chunks. Requires project.knowledge.read.

## Arguments

| Name                       | Type                 | Required | Description                                                                                                       |
| -------------------------- | -------------------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| `input`                    | ListFileChunksInput! | Yes      |                                                                                                                   |
| `input.filePath`           | String!              | Yes      | File path to list chunks for                                                                                      |
| `input.environment`        | SearchEnvironment    |          | Search environment One of `PREVIEW`, `PRODUCTION`, `RELEASE`.                                                     |
| `input.branchId`           | ID                   |          | Branch ID for PREVIEW environment                                                                                 |
| `input.releaseId`          | ID                   |          | Release ID for RELEASE environment                                                                                |
| `input.releaseVersion`     | String               |          | Release version for RELEASE environment                                                                           |
| `input.includeEmbeddings`  | Boolean              |          | Include embeddings in results                                                                                     |
| `input.embeddingDimension` | EmbeddingDimension   |          | Embedding dimension (required if includeEmbeddings=true) One of `D768`, `D1024`, `D1536`, `D3072`, `D4096`.       |
| `input.limit`              | Int                  |          | Page size 1–100; defaults to 10.                                                                                  |
| `input.cursor`             | String               |          | Opaque continuation from pageInfo.endCursor for the same file and snapshot. Chunks are ordered by index, then ID. |

## Variables

```json
{
  "input": {
    "filePath": "string"
  }
}
```

## Responses

| Status | Description                                        |
| ------ | -------------------------------------------------- |
| 200    | The ListFileChunksPayload! in data.listFileChunks. |

## 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 ListFileChunks($input: ListFileChunksInput!) {\n  listFileChunks(input: $input) {\n    chunks {\n      id\n      index\n      content\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "input": {
      "filePath": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "listFileChunks": {
      "chunks": [
        {
          "id": "string",
          "index": 0,
          "content": "string"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
