# deployments

```graphql
query Deployments($projectReference: String!) {
  deployments(projectReference: $projectReference) {
    data {
      id
      releaseId
      environmentId
      userId
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List deployments. Requires project.deployments.read.

## Arguments

| Name               | Type                | Required | Description                                                              |
| ------------------ | ------------------- | -------- | ------------------------------------------------------------------------ |
| `projectReference` | String!             | Yes      | Project UUID, slug or configured domain.                                 |
| `environmentId`    | ID                  |          | Only deployments of this environment of the project.                     |
| `limit`            | Int                 |          | Deployments per page, between 1 and 100. Defaults to 20.                 |
| `cursor`           | String              |          | pageInfo.endCursor of the previous page.                                 |
| `sortBy`           | String              |          | Sort field. Only created\_at.                                            |
| `sortOrder`        | DeploymentSortOrder |          | Sort direction by creation time. Defaults to desc. One of `asc`, `desc`. |

## Variables

```json
{
  "projectReference": "string"
}
```

## Responses

| Status | Description                                     |
| ------ | ----------------------------------------------- |
| 200    | The DeploymentsConnection! in data.deployments. |

## 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 Deployments($projectReference: String!) {\n  deployments(projectReference: $projectReference) {\n    data {\n      id\n      releaseId\n      environmentId\n      userId\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "projectReference": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "deployments": {
      "data": [
        {
          "id": "string",
          "releaseId": "string",
          "environmentId": "string",
          "userId": "string",
          "createdAt": "2026-01-01T00:00:00Z",
          "updatedAt": "2026-01-01T00:00:00Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
