# canonicalRunEventsV1

```graphql
query CanonicalRunEventsV1($command: CanonicalRunEventsCommandV1!) {
  canonicalRunEventsV1(command: $command) {
    cursor_profile
    entries {
      __typename
    }
    nextCursor
    hasMore
  }
}
```

Read canonical run events with durable replay cursors.

## Arguments

| Name                         | Type                         | Required | Description                          |
| ---------------------------- | ---------------------------- | -------- | ------------------------------------ |
| `command`                    | CanonicalRunEventsCommandV1! | Yes      |                                      |
| `command.runId`              | ID!                          | Yes      |                                      |
| `command.cursor`             | RunEventCursorV1             |          |                                      |
| `command.limit`              | Int                          |          | Default `20`.                        |
| `command.sortOrder`          | RunEventSortV1               |          | Default `ASC`. One of `ASC`, `DESC`. |
| `command.afterEventId`       | RunEventCursorV1             |          |                                      |
| `command.eventType`          | \[String!]                   |          |                                      |
| `command.eventClass`         | RunEventClassV1              |          | One of `FACT`, `DELTA`.              |
| `command.isError`            | Boolean                      |          |                                      |
| `command.start`              | String                       |          |                                      |
| `command.end`                | String                       |          |                                      |
| `command.spanId`             | String                       |          |                                      |
| `command.turnId`             | String                       |          |                                      |
| `command.search`             | String                       |          |                                      |
| `command.includeDescendants` | Boolean                      |          | Default `false`.                     |
| `command.cursorProfile`      | String                       |          |                                      |

## Variables

```json
{
  "command": {
    "runId": "string"
  }
}
```

## Responses

| Status | Description                                                 |
| ------ | ----------------------------------------------------------- |
| 200    | The CanonicalRunEventsPageV1! in data.canonicalRunEventsV1. |

## 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 CanonicalRunEventsV1($command: CanonicalRunEventsCommandV1!) {\n  canonicalRunEventsV1(command: $command) {\n    cursor_profile\n    entries {\n      __typename\n    }\n    nextCursor\n    hasMore\n  }\n}",
  "variables": {
    "command": {
      "runId": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "canonicalRunEventsV1": {
      "cursor_profile": "string",
      "entries": [
        {
          "__typename": "CanonicalRunEventMemberV1"
        }
      ],
      "nextCursor": "string",
      "hasMore": false
    }
  }
}
```
