# branch

```graphql
query Branch($input: GetBranchInput!) {
  branch(input: $input) {
    id
    projectId
    name
    baseBranchId
    createdAt
    createdBy
    mergedAt
    mergedBy
    updatedAt
    version
    description
    status
    autoDeleteOnMerge
  }
}
```

Read one branch by ID, with its status, version and base branch. Requires project.read.

## Arguments

| Name       | Type            | Required | Description |
| ---------- | --------------- | -------- | ----------- |
| `input`    | GetBranchInput! | Yes      |             |
| `input.id` | ID!             | Yes      |             |

## Variables

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

## Responses

| Status | Description                |
| ------ | -------------------------- |
| 200    | The Branch in data.branch. |

## 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 Branch($input: GetBranchInput!) {\n  branch(input: $input) {\n    id\n    projectId\n    name\n    baseBranchId\n    createdAt\n    createdBy\n    mergedAt\n    mergedBy\n    updatedAt\n    version\n    description\n    status\n    autoDeleteOnMerge\n  }\n}",
  "variables": {
    "input": {
      "id": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "branch": {
      "id": "string",
      "projectId": "string",
      "name": "string",
      "baseBranchId": "string",
      "createdAt": "string",
      "createdBy": "string",
      "mergedAt": "string",
      "mergedBy": "string",
      "updatedAt": "string",
      "version": 0,
      "description": "string",
      "status": "active",
      "autoDeleteOnMerge": false
    }
  }
}
```
