> 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/workflowexecutioninfoconnection.md).

# WorkflowExecutionInfoConnection

WorkflowExecutionInfoConnection Type - Paginated workflow execution results

Audience: Programmer

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

This connection provides efficient pagination through potentially large result sets of workflow executions, using Temporal's NextPageToken for cursor-based navigation.

## Fields

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

## Related Types

### WorkflowExecutionInfoEdge

| Field    | Type                     | Description                        |
| -------- | ------------------------ | ---------------------------------- |
| `node`   | `WorkflowExecutionInfo!` | The workflow execution information |
| `cursor` | `String!`                | Cursor for use in pagination       |

### WorkflowExecutionPageInfo

| 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

### Basic Paginated Query

```graphql
query {
  workflowExecutions(
    where: {
      status: "RUNNING"
    }
    first: 50
    orderBy: { direction: DESC, field: START_TIME }
  ) {
    edges {
      node {
        execution {
          workflowId
          id
        }
        type {
          name
        }
        status
        startTime
        historyLength
        searchAttributes {
          key
          value
        }
      }
      cursor
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    totalCount
  }
}
```

### Paginating Through Results

```graphql
# First page
query FirstPage {
  workflowExecutions(
    where: { typeName: "PickingWorkflow" }
    first: 100
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    totalCount
  }
}

# Next page (use endCursor from previous response)
query NextPage {
  workflowExecutions(
    where: { typeName: "PickingWorkflow" }
    first: 100
    after: "eyJzdGFydFRpbWUiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9"
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

### Example Response

```json
{
  "data": {
    "workflowExecutions": {
      "edges": [
        {
          "node": {
            "execution": {
              "workflowId": "picking-order-12345",
              "id": "run-abc-123"
            },
            "type": {
              "name": "PickingWorkflow"
            },
            "status": "RUNNING",
            "startTime": "2024-01-15T10:30:00Z",
            "historyLength": 42,
            "searchAttributes": [
              { "key": "pyck_title", "value": "Picking Order #12345" },
              { "key": "pyck_group_title", "value": "Zone A" }
            ]
          },
          "cursor": "eyJzdGFydFRpbWUiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9"
        },
        {
          "node": {
            "execution": {
              "workflowId": "picking-order-12346",
              "id": "run-def-456"
            },
            "type": {
              "name": "PickingWorkflow"
            },
            "status": "RUNNING",
            "startTime": "2024-01-15T10:25:00Z",
            "historyLength": 28,
            "searchAttributes": [
              { "key": "pyck_title", "value": "Picking Order #12346" },
              { "key": "pyck_group_title", "value": "Zone B" }
            ]
          },
          "cursor": "eyJzdGFydFRpbWUiOiIyMDI0LTAxLTE1VDEwOjI1OjAwWiJ9"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "hasPreviousPage": false,
        "startCursor": "eyJzdGFydFRpbWUiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9",
        "endCursor": "eyJzdGFydFRpbWUiOiIyMDI0LTAxLTE1VDEwOjI1OjAwWiJ9"
      },
      "totalCount": 150
    }
  }
}
```

## Breaking Change

This connection type is new and replaces the previous array return type of the `workflowExecutions` query.

**Before:**

```graphql
query {
  workflowExecutions(where: { ... }) {  # Returned [WorkflowExecutionInfo!]!
    execution { workflowId }
    status
  }
}
```

**After:**

```graphql
query {
  workflowExecutions(where: { ... }) {  # Returns WorkflowExecutionInfoConnection!
    edges {
      node {
        execution { workflowId }
        status
      }
    }
  }
}
```

## Notes

* This connection provides lightweight execution metadata WITHOUT history
* To fetch history, use the `workflowHistory` query with `WorkflowExecutionHistoryConnection`
* Pagination uses Temporal's NextPageToken directly, encoded in the cursor
* Default page size is 100 if `first` is not specified
* Use `totalCount` to display the total number of matching executions

## Related Documentation

* [workflowExecutions Query](/graphql-api/queries/workflowexecutions.md) - Query that returns this connection type
* [WorkflowExecutionInfo](/graphql-api/types/workflowexecutioninfo.md) - The node type in this connection
* [WorkflowExecutionHistoryConnection](/graphql-api/types/workflowexecutionhistoryconnection.md) - Connection for history retrieval
* [workflowHistory Query](/graphql-api/queries/workflowhistory.md) - Query for history data


---

# 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/workflowexecutioninfoconnection.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.
