# branchPolicyCollection

```graphql
query BranchPolicyCollection($input: BranchPolicyCollectionInput!) {
  branchPolicyCollection(input: $input) {
    edges {
      cursor
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    previousCursor
  }
}
```

List the merge policies of a project, which set the approvals and reviewers a branch needs. Requires project.read.

## Arguments

| Name                     | Type                         | Required | Description                                                                                     |
| ------------------------ | ---------------------------- | -------- | ----------------------------------------------------------------------------------------------- |
| `input`                  | BranchPolicyCollectionInput! | Yes      |                                                                                                 |
| `input.projectReference` | String!                      | Yes      |                                                                                                 |
| `input.limit`            | Int                          |          | Page size 1–100; defaults to 20.                                                                |
| `input.cursor`           | String                       |          | Previous endCursor or previousCursor; retain the same project, principal, filter and page size. |
| `input.enabledOnly`      | Boolean                      |          | Restrict to enabled policies; defaults to false.                                                |

## Variables

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

## Responses

| Status | Description                                                 |
| ------ | ----------------------------------------------------------- |
| 200    | The BranchPolicyCollection! in data.branchPolicyCollection. |

## 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 BranchPolicyCollection($input: BranchPolicyCollectionInput!) {\n  branchPolicyCollection(input: $input) {\n    edges {\n      cursor\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n    previousCursor\n  }\n}",
  "variables": {
    "input": {
      "projectReference": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "branchPolicyCollection": {
      "edges": [
        {
          "cursor": "string"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      },
      "previousCursor": "string"
    }
  }
}
```
