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

# WorkflowExecutions

Query workflow executions with pagination and filtering

Audience: Programmer

Returns a paginated list of Temporal workflow executions with optional filtering and ordering. This query provides lightweight execution metadata without history for efficient retrieval of workflow execution status.

For workflow history events, use the separate `workflowHistory` query.

## Arguments

| Name      | Type                           | Description                                                            |
| --------- | ------------------------------ | ---------------------------------------------------------------------- |
| `where`   | `WorkflowExecutionsWhereInput` | Filter criteria for workflow executions                                |
| `first`   | `Int`                          | Maximum number of executions to return. Defaults to 100                |
| `after`   | `String`                       | Pagination cursor from previous response (NextPageToken from Temporal) |
| `orderBy` | `WorkflowExecutionOrder`       | Ordering options for the returned list                                 |

## Return Type

`WorkflowExecutionInfoConnection!` - A connection containing workflow execution information with pagination support.

### Connection Fields

| Field        | Type                            | Description                        |
| ------------ | ------------------------------- | ---------------------------------- |
| `edges`      | `[WorkflowExecutionInfoEdge!]!` | List of workflow execution edges   |
| `pageInfo`   | `WorkflowExecutionPageInfo!`    | Pagination information             |
| `totalCount` | `Int!`                          | Total count of matching executions |

### Edge Fields

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

## Filter Options (WorkflowExecutionsWhereInput)

### Workflow Identification

| Filter                   | Type        | Description                                     |
| ------------------------ | ----------- | ----------------------------------------------- |
| `workflowID`             | `String`    | Exact workflow ID match                         |
| `workflowIDNeq`          | `String`    | Not equal to workflow ID                        |
| `workflowIDIn`           | `[String!]` | Match any of the provided workflow IDs          |
| `workflowIDNotIn`        | `[String!]` | Exclude specific workflow IDs                   |
| `workflowIDHasPrefix`    | `String`    | Workflow ID starts with                         |
| `workflowIDHasSuffix`    | `String`    | Workflow ID ends with                           |
| `workflowIDContains`     | `String`    | Workflow ID contains substring (case-sensitive) |
| `workflowIDEqualFold`    | `String`    | Case-insensitive equality match                 |
| `workflowIDContainsFold` | `String`    | Case-insensitive substring match                |
| `runID`                  | `String`    | Exact run ID match                              |
| `runIDNeq`               | `String`    | Not equal to run ID                             |
| `runIDIn`                | `[String!]` | Match any of the provided run IDs               |
| `runIDNotIn`             | `[String!]` | Exclude specific run IDs                        |
| `runIDHasPrefix`         | `String`    | Run ID starts with                              |
| `runIDHasSuffix`         | `String`    | Run ID ends with                                |
| `runIDContains`          | `String`    | Run ID contains substring (case-sensitive)      |
| `runIDEqualFold`         | `String`    | Case-insensitive equality match                 |
| `runIDContainsFold`      | `String`    | Case-insensitive substring match                |

### Workflow Type

| Filter                 | Type        | Description                                   |
| ---------------------- | ----------- | --------------------------------------------- |
| `typeName`             | `String`    | Exact workflow type name                      |
| `typeNameNeq`          | `String`    | Not equal to type name                        |
| `typeNameIn`           | `[String!]` | Match any of the provided type names          |
| `typeNameNotIn`        | `[String!]` | Exclude specific type names                   |
| `typeNameHasPrefix`    | `String`    | Type name starts with                         |
| `typeNameHasSuffix`    | `String`    | Type name ends with                           |
| `typeNameContains`     | `String`    | Type name contains substring (case-sensitive) |
| `typeNameEqualFold`    | `String`    | Case-insensitive equality match               |
| `typeNameContainsFold` | `String`    | Case-insensitive substring match              |

### Workflow Name

| Filter                     | Type        | Description                                         |
| -------------------------- | ----------- | --------------------------------------------------- |
| `workflowName`             | `String`    | Exact workflow name match (custom search attribute) |
| `workflowNameNeq`          | `String`    | Not equal to workflow name                          |
| `workflowNameIn`           | `[String!]` | Match any of the provided workflow names            |
| `workflowNameNotIn`        | `[String!]` | Exclude specific workflow names                     |
| `workflowNameHasPrefix`    | `String`    | Workflow name starts with                           |
| `workflowNameHasSuffix`    | `String`    | Workflow name ends with                             |
| `workflowNameContains`     | `String`    | Workflow name contains substring (case-sensitive)   |
| `workflowNameEqualFold`    | `String`    | Case-insensitive equality match                     |
| `workflowNameContainsFold` | `String`    | Case-insensitive substring match                    |

### Status

| Filter               | Type        | Description                                           |
| -------------------- | ----------- | ----------------------------------------------------- |
| `status`             | `String`    | Exact status match (RUNNING, COMPLETED, FAILED, etc.) |
| `statusNeq`          | `String`    | Not equal to status                                   |
| `statusIn`           | `[String!]` | Match any of the provided statuses                    |
| `statusNotIn`        | `[String!]` | Exclude specific statuses                             |
| `statusHasPrefix`    | `String`    | Status starts with                                    |
| `statusHasSuffix`    | `String`    | Status ends with                                      |
| `statusContains`     | `String`    | Status contains substring (case-sensitive)            |
| `statusEqualFold`    | `String`    | Case-insensitive equality match                       |
| `statusContainsFold` | `String`    | Case-insensitive substring match                      |

### Time Filters

| Filter            | Type      | Description                    |
| ----------------- | --------- | ------------------------------ |
| `startTime`       | `String`  | Exact start time (ISO 8601)    |
| `startTimeGT`     | `String`  | Started after                  |
| `startTimeGTE`    | `String`  | Started at or after            |
| `startTimeLT`     | `String`  | Started before                 |
| `startTimeLTE`    | `String`  | Started at or before           |
| `closeTime`       | `String`  | Exact close time               |
| `closeTimeGT`     | `String`  | Closed after                   |
| `closeTimeGTE`    | `String`  | Closed at or after             |
| `closeTimeIsNil`  | `Boolean` | Still running (no close time)  |
| `closeTimeNotNil` | `Boolean` | Has completed (has close time) |

### Search Attributes

| Filter                 | Type        | Description                                   |
| ---------------------- | ----------- | --------------------------------------------- |
| `service`              | `String`    | Exact service name match                      |
| `serviceNeq`           | `String`    | Not equal to service                          |
| `serviceIn`            | `[String!]` | Match any of the services                     |
| `serviceNotIn`         | `[String!]` | Exclude specific services                     |
| `serviceHasPrefix`     | `String`    | Service starts with                           |
| `serviceHasSuffix`     | `String`    | Service ends with                             |
| `serviceContains`      | `String`    | Service contains substring (case-sensitive)   |
| `serviceEqualFold`     | `String`    | Case-insensitive equality match               |
| `serviceContainsFold`  | `String`    | Case-insensitive substring match              |
| `serviceIsNil`         | `Boolean`   | Service is not set                            |
| `serviceNotNil`        | `Boolean`   | Service is set                                |
| `dataType`             | `String`    | Exact data type match                         |
| `dataTypeNeq`          | `String`    | Not equal to data type                        |
| `dataTypeIn`           | `[String!]` | Match any data types                          |
| `dataTypeNotIn`        | `[String!]` | Exclude specific data types                   |
| `dataTypeHasPrefix`    | `String`    | Data type starts with                         |
| `dataTypeHasSuffix`    | `String`    | Data type ends with                           |
| `dataTypeContains`     | `String`    | Data type contains substring (case-sensitive) |
| `dataTypeEqualFold`    | `String`    | Case-insensitive equality match               |
| `dataTypeContainsFold` | `String`    | Case-insensitive substring match              |
| `dataTypeIsNil`        | `Boolean`   | Data type is not set                          |
| `dataTypeNotNil`       | `Boolean`   | Data type is set                              |
| `dataId`               | `String`    | Exact data ID match                           |
| `dataIdNeq`            | `String`    | Not equal to data ID                          |
| `dataIdIn`             | `[String!]` | Match any data IDs                            |
| `dataIdNotIn`          | `[String!]` | Exclude specific data IDs                     |
| `dataIdHasPrefix`      | `String`    | Data ID starts with                           |
| `dataIdHasSuffix`      | `String`    | Data ID ends with                             |
| `dataIdContains`       | `String`    | Data ID contains substring                    |
| `dataIdIsNil`          | `Boolean`   | Data ID is not set                            |
| `dataIdNotNil`         | `Boolean`   | Data ID is set                                |

### Targets (KeywordList)

The `targets` and `targetsNotIn` predicates filter against the `pyck_workflow_targets` KeywordList search attribute. KeywordList semantics mean that a workflow matches when its declared target list contains **any** element of the supplied set; `targetsNotIn` excludes such matches.

| Filter         | Type                | Description                                                        |
| -------------- | ------------------- | ------------------------------------------------------------------ |
| `targets`      | `[WorkflowTarget!]` | Match workflows whose targets include any of the supplied values   |
| `targetsNotIn` | `[WorkflowTarget!]` | Exclude workflows whose targets include any of the supplied values |

See the [WorkflowTarget](/graphql-api/enums/workflowtarget.md) enum for the available values (`WEB`, `MOBILE`, `SETUP`).

### Assignment

| Filter                 | Type        | Description                                  |
| ---------------------- | ----------- | -------------------------------------------- |
| `assignee`             | `String`    | Exact assignee match                         |
| `assigneeNeq`          | `String`    | Not equal to assignee                        |
| `assigneeIn`           | `[String!]` | Match any assignees                          |
| `assigneeNotIn`        | `[String!]` | Exclude specific assignees                   |
| `assigneeHasPrefix`    | `String`    | Assignee starts with                         |
| `assigneeHasSuffix`    | `String`    | Assignee ends with                           |
| `assigneeContains`     | `String`    | Assignee contains substring (case-sensitive) |
| `assigneeEqualFold`    | `String`    | Case-insensitive equality match              |
| `assigneeContainsFold` | `String`    | Case-insensitive substring match             |
| `assigneeIsNil`        | `Boolean`   | Unassigned workflows                         |
| `assigneeNotNil`       | `Boolean`   | Assigned workflows                           |
| `groupBy`              | `String`    | Exact group by value                         |
| `groupByNeq`           | `String`    | Not equal to group by value                  |
| `groupByIn`            | `[String!]` | Match any group by values                    |
| `groupByNotIn`         | `[String!]` | Exclude specific group by values             |
| `groupByHasPrefix`     | `String`    | Group by starts with                         |
| `groupByHasSuffix`     | `String`    | Group by ends with                           |
| `groupByContains`      | `String`    | Group by contains substring (case-sensitive) |
| `groupByEqualFold`     | `String`    | Case-insensitive equality match              |
| `groupByContainsFold`  | `String`    | Case-insensitive substring match             |
| `groupByIsNil`         | `Boolean`   | Group by is not set                          |
| `groupByNotNil`        | `Boolean`   | Group by is set                              |

### Title (pyck\_title search attribute)

These predicates match the `pyck_title` Temporal search attribute, which holds the per-workflow display label written via `workflowsdk.SetWorkflowTitle`.

| Filter              | Type        | Description                                        |
| ------------------- | ----------- | -------------------------------------------------- |
| `title`             | `String`    | Exact title match                                  |
| `titleNEQ`          | `String`    | Not equal to title                                 |
| `titleIn`           | `[String!]` | Match any of the provided titles                   |
| `titleNotIn`        | `[String!]` | Exclude specific titles                            |
| `titleContains`     | `String`    | Title contains substring (case-sensitive)          |
| `titleHasPrefix`    | `String`    | Title starts with                                  |
| `titleHasSuffix`    | `String`    | Title ends with                                    |
| `titleEqualFold`    | `String`    | Case-insensitive equality match                    |
| `titleContainsFold` | `String`    | Case-insensitive substring match                   |
| `titleIsNil`        | `Boolean`   | Title is not set (matches missing or empty string) |
| `titleNotNil`       | `Boolean`   | Title is set to a non-empty value                  |

### Group Title (pyck\_group\_title search attribute)

These predicates match the `pyck_group_title` Temporal search attribute, the human-readable label for the workflow group header. It pairs with `groupBy` (the technical join key), and is written via `workflowsdk.SetGroupTitle`.

| Filter                   | Type        | Description                                              |
| ------------------------ | ----------- | -------------------------------------------------------- |
| `groupTitle`             | `String`    | Exact group title match                                  |
| `groupTitleNEQ`          | `String`    | Not equal to group title                                 |
| `groupTitleIn`           | `[String!]` | Match any of the provided group titles                   |
| `groupTitleNotIn`        | `[String!]` | Exclude specific group titles                            |
| `groupTitleContains`     | `String`    | Group title contains substring (case-sensitive)          |
| `groupTitleHasPrefix`    | `String`    | Group title starts with                                  |
| `groupTitleHasSuffix`    | `String`    | Group title ends with                                    |
| `groupTitleEqualFold`    | `String`    | Case-insensitive equality match                          |
| `groupTitleContainsFold` | `String`    | Case-insensitive substring match                         |
| `groupTitleIsNil`        | `Boolean`   | Group title is not set (matches missing or empty string) |
| `groupTitleNotNil`       | `Boolean`   | Group title is set to a non-empty value                  |

### Sort Key (pyck\_sort\_key search attribute)

The `pyck_sort_key` search attribute is a numeric value used by the UI to impose a stable display order on workflow executions. When not set, workflows default to start-time ordering.

| Filter          | Type      | Description                         |
| --------------- | --------- | ----------------------------------- |
| `sortKey`       | `Int`     | Exact sort key match                |
| `sortKeyNEQ`    | `Int`     | Not equal to sort key               |
| `sortKeyIn`     | `[Int!]`  | Match any of the provided sort keys |
| `sortKeyNotIn`  | `[Int!]`  | Exclude specific sort keys          |
| `sortKeyGT`     | `Int`     | Sort key greater than               |
| `sortKeyGTE`    | `Int`     | Sort key greater than or equal      |
| `sortKeyLT`     | `Int`     | Sort key less than                  |
| `sortKeyLTE`    | `Int`     | Sort key less than or equal         |
| `sortKeyIsNil`  | `Boolean` | Sort key is not set                 |
| `sortKeyNotNil` | `Boolean` | Sort key is set                     |

### Logical Operators

| Filter | Type                              | Description               |
| ------ | --------------------------------- | ------------------------- |
| `and`  | `[WorkflowExecutionsWhereInput!]` | All conditions must match |
| `or`   | `[WorkflowExecutionsWhereInput!]` | Any condition matches     |
| `not`  | `WorkflowExecutionsWhereInput`    | Negate condition          |

## Ordering Options (WorkflowExecutionOrder)

| Field       | Values                                                                                  | Description      |
| ----------- | --------------------------------------------------------------------------------------- | ---------------- |
| `direction` | `ASC`, `DESC`                                                                           | Sort direction   |
| `field`     | `START_TIME`, `CLOSE_TIME`, `WORKFLOW_ID`, `STATUS`, `TITLE`, `GROUP_TITLE`, `SORT_KEY` | Field to sort by |

`TITLE` orders by the `pyck_title` search attribute and `GROUP_TITLE` orders by the `pyck_group_title` search attribute, enabling alphabetical sorting of workflows by their human-readable display label or group header. `SORT_KEY` orders by the numeric `pyck_sort_key` search attribute, giving the UI an explicit display position independent of start time.

## Usage Examples

### Basic Query with Pagination

```graphql
query {
  workflowExecutions(
    first: 50
    orderBy: { direction: DESC, field: START_TIME }
  ) {
    edges {
      node {
        execution {
          workflowId
          id
        }
        type {
          name
        }
        status
        startTime
        closeTime
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    totalCount
  }
}
```

### Filter by Status and Type

```graphql
query {
  workflowExecutions(
    where: {
      typeName: "PickingWorkflow"
      status: "RUNNING"
    }
    first: 100
  ) {
    edges {
      node {
        execution {
          workflowId
          id
        }
        type {
          name
        }
        status
        startTime
        historyLength
        searchAttributes {
          key
          value
        }
      }
    }
    totalCount
  }
}
```

### Complex Filtering with AND

```graphql
query {
  workflowExecutions(
    where: {
      and: [
        { typeNameIn: ["PickingWorkflow", "ReceivingWorkflow"] }
        { statusNotIn: ["COMPLETED", "FAILED"] }
        { startTimeGTE: "2024-01-01T00:00:00Z" }
        { assigneeNotNil: true }
      ]
    }
    first: 50
    orderBy: { direction: ASC, field: START_TIME }
  ) {
    edges {
      node {
        execution {
          workflowId
        }
        status
        startTime
        searchAttributes {
          key
          value
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

### Using OR Operator

Find workflows that are either unassigned or not assigned to a specific user:

```graphql
query {
  workflowExecutions(
    where: {
      or: [
        { assigneeIsNil: true }
        { assigneeNeq: "user-123" }
      ]
    }
    first: 50
  ) {
    edges {
      node {
        execution {
          workflowId
        }
        status
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

Find workflows in multiple statuses from different services:

```graphql
query {
  workflowExecutions(
    where: {
      or: [
        {
          and: [
            { service: "picking" }
            { status: "RUNNING" }
          ]
        }
        {
          and: [
            { service: "receiving" }
            { statusIn: ["RUNNING", "PENDING"] }
          ]
        }
      ]
    }
    first: 100
  ) {
    edges {
      node {
        execution { workflowId }
        status
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

### Using NOT Operator

Exclude specific workflow types:

```graphql
query {
  workflowExecutions(
    where: {
      not: {
        typeNameIn: ["TestWorkflow", "DebugWorkflow"]
      }
      status: "RUNNING"
    }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        type { name }
        status
      }
    }
  }
}
```

### Combining OR, AND, and NOT

Find active workflows that are either high priority or assigned to a specific team:

```graphql
query {
  workflowExecutions(
    where: {
      and: [
        {
          not: {
            statusIn: ["COMPLETED", "FAILED", "CANCELED"]
          }
        }
        {
          or: [
            { workflowNameContains: "URGENT" }
            { assigneeHasPrefix: "team-alpha-" }
          ]
        }
      ]
    }
    first: 50
    orderBy: { direction: DESC, field: START_TIME }
  ) {
    edges {
      node {
        execution { workflowId }
        status
        startTime
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

### Using String Predicates

Case-insensitive search with suffix matching:

```graphql
query {
  workflowExecutions(
    where: {
      # Case-insensitive search for workflow names ending with "order"
      workflowNameHasSuffix: "order"
      workflowNameEqualFold: "picking-order"
    }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
    }
  }
}
```

Search workflows with case-insensitive substring matching:

```graphql
query {
  workflowExecutions(
    where: {
      # Find workflows containing "test" (case-insensitive)
      workflowNameContainsFold: "test"
      # Match data IDs ending with specific pattern
      dataIdHasSuffix: "-batch-001"
    }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

### Paginating Through Results

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

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

### Find Specific Workflow

```graphql
query {
  workflowExecutions(
    where: {
      workflowID: "picking-order-12345"
    }
  ) {
    edges {
      node {
        execution {
          workflowId
          id
        }
        type {
          name
        }
        status
        startTime
        closeTime
        historyLength
        historySizeBytes
        taskQueue
        executionDuration
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

### Filter by Title or Group Title

Find workflows whose display label matches an exact value:

```graphql
query {
  workflowExecutions(
    where: {
      title: "SKU-123"
    }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        status
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

Find workflows whose title shares a common prefix and sort them alphabetically:

```graphql
query {
  workflowExecutions(
    where: {
      titleHasPrefix: "SKU-"
    }
    first: 100
    orderBy: { direction: ASC, field: TITLE }
  ) {
    edges {
      node {
        execution { workflowId }
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

Find workflows that have not yet had a title set (treats missing attribute or empty string as null):

```graphql
query {
  workflowExecutions(
    where: {
      titleIsNil: true
      status: "RUNNING"
    }
    first: 100
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
    }
  }
}
```

Group workflows under a shared group header and sort them by group title:

```graphql
query {
  workflowExecutions(
    where: {
      groupTitleHasPrefix: "ORDER-"
    }
    first: 100
    orderBy: { direction: ASC, field: GROUP_TITLE }
  ) {
    edges {
      node {
        execution { workflowId }
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

Restrict to a known set of group titles:

```graphql
query {
  workflowExecutions(
    where: {
      groupTitleIn: ["ORDER-42", "ORDER-43"]
    }
    first: 100
  ) {
    edges {
      node {
        execution { workflowId }
      }
    }
  }
}
```

### Filter by Data Type and Service

```graphql
query {
  workflowExecutions(
    where: {
      service: "picking"
      dataType: "picking-order"
    }
    first: 50
  ) {
    edges {
      node {
        execution {
          workflowId
        }
        status
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

### Filter by Sort Key

Find workflows with a specific sort key for ordering:

```graphql
query {
  workflowExecutions(
    where: {
      sortKey: 42
    }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        status
        searchAttributes {
          key
          value
        }
      }
    }
  }
}
```

Find workflows within a sort key range:

```graphql
query {
  workflowExecutions(
    where: {
      sortKeyGTE: 10
      sortKeyLTE: 99
    }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
    }
  }
}
```

### Order by Sort Key

Order workflows by their numeric display position:

```graphql
query {
  workflowExecutions(
    where: {
      status: "RUNNING"
    }
    orderBy: { direction: ASC, field: SORT_KEY }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        status
        startTime
      }
    }
  }
}
```

Find workflows that don't have a sort key set (will use default ordering):

```graphql
query {
  workflowExecutions(
    where: {
      sortKeyIsNil: true
    }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
    }
  }
}
```

## 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",
            "closeTime": null,
            "historyLength": 42,
            "searchAttributes": [
              { "key": "pyck_title", "value": "Picking Order #12345" },
              { "key": "pyck_group_title", "value": "Zone A" }
            ]
          },
          "cursor": "eyJzdGFydFRpbWUiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "eyJzdGFydFRpbWUiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9"
      },
      "totalCount": 150
    }
  }
}
```

## Breaking Changes

This query has undergone significant changes:

1. **Return type changed** from `[WorkflowExecutionInfo!]!` to `WorkflowExecutionInfoConnection!`
2. **Pagination support added** via `first` and `after` parameters
3. **Ordering support added** via `orderBy` parameter
4. **History not included** - use `workflowHistory` query for history events
5. **`memo` field removed from `WorkflowExecutionInfo`** - per-workflow titles now live in the `pyck_title` and `pyck_group_title` search attributes. New `title*` and `groupTitle*` predicates and the `TITLE` / `GROUP_TITLE` order fields let you filter and sort on them server-side.

See [WorkflowExecutionInfo](/graphql-api/types/workflowexecutioninfo.md) for migration examples.

## Notes

* Returns lightweight execution metadata WITHOUT history for performance
* Use `workflowHistory` query to fetch history for specific executions
* Pagination uses Temporal's NextPageToken directly
* Default page size is 100 if `first` is not specified
* Results can be ordered by start time, close time, workflow ID, status, title, or group title
* **Logical operators** (`or`, `and`, `not`) are fully supported for building complex queries
* **String predicates** include case-sensitive (`hasPrefix`, `hasSuffix`, `contains`) and case-insensitive (`equalFold`, `containsFold`) variants
* **Case-insensitive predicates** (`equalFold`, `containsFold`) map to the same Temporal operators as their case-sensitive counterparts since Temporal doesn't have native case-insensitive operators

### Filter by Targets

Find workflows that target the mobile surface:

```graphql
query {
  workflowExecutions(
    where: {
      targets: [MOBILE]
      status: "RUNNING"
    }
    first: 50
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
    }
    totalCount
  }
}
```

Find workflows that target either web or mobile (KeywordList semantics — the workflow's target list need only contain one of these):

```graphql
query {
  workflowExecutions(
    where: {
      targets: [WEB, MOBILE]
    }
    first: 100
  ) {
    edges {
      node {
        execution { workflowId }
      }
    }
  }
}
```

Exclude workflows targeting the setup surface:

```graphql
query {
  workflowExecutions(
    where: {
      targetsNotIn: [SETUP]
      status: "RUNNING"
    }
    first: 100
  ) {
    edges {
      node {
        execution { workflowId }
        status
      }
    }
  }
}
```

## Related Documentation

* [workflowHistory](/graphql-api/queries/workflowhistory.md) - Fetch workflow history events
* [workflowTargets](/graphql-api/queries/workflowtargets.md) - Read the current target surfaces of a workflow execution
* [setWorkflowTargets](/graphql-api/mutations/setworkflowtargets.md) - Replace the target surfaces of a workflow
* [WorkflowTarget](/graphql-api/enums/workflowtarget.md) - Enum of supported workflow target surfaces
* [WorkflowExecutionInfo](/graphql-api/types/workflowexecutioninfo.md) - Execution info type
* [WorkflowExecutionInfoConnection](/graphql-api/types/workflowexecutioninfoconnection.md) - Connection type
* [WorkflowEvent](/graphql-api/types/workflowevent.md) - History event type


---

# 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/queries/workflowexecutions.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.
