> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/types/workflowexecutionhistoryconnection.md).

# WorkflowExecutionHistoryConnection

WorkflowExecutionHistoryConnection Type - Paginated workflow history results

Audience: Programmer

A connection type for paginated access to workflow execution history. This type follows the Relay connection specification and is returned by the `workflowHistory` query.

## Fields

| Field        | Type                               | Description                                  |
| ------------ | ---------------------------------- | -------------------------------------------- |
| `edges`      | `[WorkflowExecutionHistoryEdge!]!` | List of workflow execution history edges     |
| `pageInfo`   | `WorkflowPageInfo!`                | Information for pagination                   |
| `totalCount` | `Int!`                             | Total number of matching workflow executions |

## Related Types

### WorkflowExecutionHistoryEdge

| Field    | Type                        | Description                             |
| -------- | --------------------------- | --------------------------------------- |
| `node`   | `WorkflowExecutionHistory!` | The workflow execution with its history |
| `cursor` | `String!`                   | Cursor for use in pagination            |

### WorkflowPageInfo

| Field             | Type       | Description                                   |
| ----------------- | ---------- | --------------------------------------------- |
| `hasNextPage`     | `Boolean!` | Whether there are more items after this page  |
| `hasPreviousPage` | `Boolean!` | Whether there are more items before this page |
| `startCursor`     | `String`   | Cursor of the first item                      |
| `endCursor`       | `String`   | Cursor of the last item                       |

## Service

This type is defined in the **Workflow** service.

## Usage Example

### Query with Pagination

```graphql
query {
  workflowHistory(
    where: {
      typeName: "PickingWorkflow"
      status: "COMPLETED"
    }
    limit: 10
  ) {
    edges {
      node {
        execution {
          workflowId
          id
        }
        typeName
        history {
          eventId
          eventType
          eventTime
        }
      }
      cursor
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    totalCount
  }
}
```

### Example Response

```json
{
  "data": {
    "workflowHistory": {
      "edges": [
        {
          "node": {
            "execution": {
              "workflowId": "picking-order-12345",
              "id": "run-abc-123"
            },
            "typeName": "PickingWorkflow",
            "history": [
              {
                "eventId": 1,
                "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED",
                "eventTime": "2024-01-15T10:30:00Z"
              },
              {
                "eventId": 2,
                "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED",
                "eventTime": "2024-01-15T10:35:00Z"
              }
            ]
          },
          "cursor": "eyJ3b3JrZmxvd0lkIjoicGlja2luZy1vcmRlci0xMjM0NSJ9"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "hasPreviousPage": false,
        "startCursor": "eyJ3b3JrZmxvd0lkIjoicGlja2luZy1vcmRlci0xMjM0NSJ9",
        "endCursor": "eyJ3b3JrZmxvd0lkIjoicGlja2luZy1vcmRlci0xMjM0NSJ9"
      },
      "totalCount": 25
    }
  }
}
```

## Notes

* This connection type wraps `WorkflowExecutionHistory` objects
* The `limit` parameter on `workflowHistory` controls the number of executions returned
* Each execution includes its complete history (no pagination within an execution's history)
* Use `totalCount` to determine the total number of matching executions

## Related Documentation

* [workflowHistory Query](/graphql-api/queries/workflowhistory.md) - Query that returns this connection type
* [WorkflowExecutionHistory](/graphql-api/types/workflowexecutionhistory.md) - The node type in this connection
* [WorkflowEvent](/graphql-api/types/workflowevent.md) - History event type
* [WorkflowExecutionInfoConnection](/graphql-api/types/workflowexecutioninfoconnection.md) - Similar connection for execution info


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/types/workflowexecutionhistoryconnection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
