> ## Documentation Index
> Fetch the complete documentation index at: https://docs.occtoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cardEntries

> Lists the entries of one card definition, with typed property values, filtering, sorting and forward paging. Select `totalCount` only when you need it.



**query** `cardEntries(after: String, definitionId: String!, first: Int, language: String, sort: [SortInput!], where: Predicate): CardEntriesConnection`

## Arguments

**`after`**: `String`

Returns the elements in the list that come after the specified cursor.

---

**`definitionId`**: `String!` (required)

Raw id of the card definition (e.g. `products`), not the global `CardDefinition.id`.

---

**`first`**: `Int`

Returns the first _n_ elements from the list.

---

**`language`**: `String`

Language code (e.g. `en`) that localized properties use in `where`, `sort`, facets and `relatedEntries`. Required when any of them uses a localized property; there's no fallback language. Property values still return every stored language.

---

**`sort`**: `[SortInput!]`

Sort keys, applied in order: a card property id, `id`, `@createdAt` or `@updatedAt`. At most 16 keys, each once (case-insensitive), with `id` only as the last key. Null or empty sorts by entry id ascending, and entry id ascending breaks ties. Missing values sort last.

---

**`where`**: `Predicate`

Filters the card entries, as a `Predicate`. Null returns every entry of the card definition.

## Returns

`CardEntriesConnection`

**`edges`**: `[CardEntriesEdge!]`

A list of edges.

---

**`facet`**: `FacetConnection`

The distinct values of one property across every entry that matches the connection's `where`, each with how many entries have it, with forward paging.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `contains`: `String` — Keeps only the values that contain this literal text. Text and list properties only.
- `exclude`: `[String!]` — Values to leave out before counting and paging, matched exactly and case-sensitively. Text and list properties only.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `ignoreCase`: `Boolean!` = false — Whether `contains` ignores case. Default false. Values that differ only in case stay separate.
- `property`: `String!` — Id of the property whose values are counted: a card property for card entries, a source property for source entries. A localized property uses the connection's `language`.
- `sort`: `FacetSortInput` — What the values are sorted by. Null sorts by `COUNT` descending, ties by value ascending.

---

**`lifecycleStates`**: `[LifecycleSearchState!]!`

The current state of each lifecycle that a `lifecycle` filter in `where` names, even when no entry matches. Empty when `where` names none.

---

**`nodes`**: `[CardEntry]`

A flattened list of the nodes.

---

**`pageInfo`**: `PageInfo!`

Information to aid in pagination.

---

**`totalCount`**: `Long!`

## Examples

```graphql Query
query CardEntries($definitionId: String!) {
  cardEntries(definitionId: $definitionId) {
    edges {
      cursor
      node {
        apiVersions {
          __typename
        }
        createdAt
        definition {
          __typename
        }
        definitionId
        entryId
        id
      }
    }
    lifecycleStates {
      activeRevision
      lifecycle {
        activeRevision
        cardDefinition {
          __typename
        }
        cardDefinitionId
        createdAt
        etag
        id
      }
      lifecycleId
      state
    }
    nodes {
      apiVersions {
        allowedOrigins
        applications {
          __typename
        }
        authentication
        cardDefinitions {
          __typename
        }
        clusters {
          __typename
        }
        createdAt
      }
      createdAt
      definition {
        activationStatus {
          __typename
        }
        activePropertySet {
          __typename
        }
        allowsEnrichment
        cardsCount
        createdAt
        createdByUser
      }
      definitionId
      entryId
      id
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
    totalCount
  }
}
```

```json Variables
{
  "definitionId": "string"
}
```

```json Response
{
  "data": {
    "cardEntries": {
      "edges": [
        {
          "cursor": "string",
          "node": {
            "apiVersions": [
              {
                "__typename": "ApiVersion"
              }
            ],
            "createdAt": "value",
            "definition": {
              "__typename": "CardDefinition"
            },
            "definitionId": "string",
            "entryId": "string",
            "id": "id"
          }
        }
      ],
      "lifecycleStates": [
        {
          "activeRevision": "value",
          "lifecycle": {
            "activeRevision": "value",
            "cardDefinition": {
              "__typename": "CardDefinition"
            },
            "cardDefinitionId": "string",
            "createdAt": "value",
            "etag": "value",
            "id": "id"
          },
          "lifecycleId": "value",
          "state": "DRAFT"
        }
      ],
      "nodes": [
        {
          "apiVersions": [
            {
              "allowedOrigins": [
                "value"
              ],
              "applications": {
                "__typename": "ApplicationsConnection"
              },
              "authentication": "PROTECTED",
              "cardDefinitions": {
                "__typename": "CardDefinitionsConnection"
              },
              "clusters": {
                "__typename": "ClustersConnection"
              },
              "createdAt": "value"
            }
          ],
          "createdAt": "value",
          "definition": {
            "activationStatus": {
              "__typename": "WorkflowStatus"
            },
            "activePropertySet": {
              "__typename": "PropertySet"
            },
            "allowsEnrichment": true,
            "cardsCount": "value",
            "createdAt": "value",
            "createdByUser": "value"
          },
          "definitionId": "string",
          "entryId": "string",
          "id": "id"
        }
      ],
      "pageInfo": {
        "endCursor": "string",
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "string"
      },
      "totalCount": "value"
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.