# conversationMessageBranches

```graphql
query ConversationMessageBranches($conversationId: ID!, $messageId: ID!) {
  conversationMessageBranches(conversationId: $conversationId, messageId: $messageId) {
    data {
      id
      conversationId
      parentId
      seq
      role
      createdBy
      senderType
      senderId
      senderDisplayName
      parts
      model
      tokenUsage
      finishReason
      costCredits
      status
      editedAt
      idempotencyKey
      metadata
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List the child messages of a message, oldest first, which are the alternative continuations that start at it; to show the alternatives to an edited message, list the children of the parent of that message.

## Arguments

| Name             | Type | Required | Description                                         |
| ---------------- | ---- | -------- | --------------------------------------------------- |
| `conversationId` | ID!  | Yes      |                                                     |
| `messageId`      | ID!  | Yes      | Parent message; it must belong to the conversation. |

## Variables

```json
{
  "conversationId": "string",
  "messageId": "string"
}
```

## Responses

| Status | Description                                                 |
| ------ | ----------------------------------------------------------- |
| 200    | The MessageConnection! in data.conversationMessageBranches. |

## 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 ConversationMessageBranches($conversationId: ID!, $messageId: ID!) {\n  conversationMessageBranches(conversationId: $conversationId, messageId: $messageId) {\n    data {\n      id\n      conversationId\n      parentId\n      seq\n      role\n      createdBy\n      senderType\n      senderId\n      senderDisplayName\n      parts\n      model\n      tokenUsage\n      finishReason\n      costCredits\n      status\n      editedAt\n      idempotencyKey\n      metadata\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "conversationId": "string",
    "messageId": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "conversationMessageBranches": {
      "data": [
        {
          "id": "string",
          "conversationId": "string",
          "parentId": "string",
          "seq": 0,
          "role": "string",
          "createdBy": "string",
          "senderType": "string",
          "senderId": "string",
          "senderDisplayName": "string",
          "parts": {},
          "model": "string",
          "tokenUsage": {},
          "finishReason": "string",
          "costCredits": "string",
          "status": "string",
          "editedAt": "string",
          "idempotencyKey": "string",
          "metadata": {},
          "createdAt": "string",
          "updatedAt": "string"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
