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

# cardPropertyTerms

> Lists the distinct values of one card property across the card entries that match `where`, each with how many entries have it, with forward paging.



**query** `cardPropertyTerms(after: String, contains: String, definitionId: String!, exclude: [String!], first: Int, ignoreCase: Boolean!, language: String, property: String!, sort: FacetSortInput, where: Predicate): FacetConnection`

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

---

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

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

---

**`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.

---

**`language`**: `String`

Language code (e.g. `en`) for a localized property, used for its values and in `where`. Required when either uses a localized property; there's no fallback language.

---

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

Id of the card property whose values are counted.

---

**`sort`**: `FacetSortInput`

What the values are sorted by. Null sorts by `COUNT` descending, ties by value ascending.

---

**`where`**: `Predicate`

Filters which card entries count, as a `Predicate`. Null counts every entry of the card definition.

## Returns

`FacetConnection`

**`edges`**: `[FacetEdge!]`

A list of edges.

---

**`nodes`**: `[FacetBucket]`

A flattened list of the nodes.

---

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

Information to aid in pagination.

---

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

## Examples

```graphql Query
query CardPropertyTerms($definitionId: String!, $property: String!) {
  cardPropertyTerms(definitionId: $definitionId, property: $property) {
    edges {
      cursor
      node {
        count
        value {
          __typename
          ... on TextValue {
            __typename
          }
        }
      }
    }
    nodes {
      count
      value {
        __typename
        ... on TextValue {
          __typename
        }
      }
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
    totalCount
  }
}
```

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

```json Response
{
  "data": {
    "cardPropertyTerms": {
      "edges": [
        {
          "cursor": "string",
          "node": {
            "count": "value",
            "value": {
              "__typename": "TextValue"
            }
          }
        }
      ],
      "nodes": [
        {
          "count": "value",
          "value": {
            "__typename": "TextValue"
          }
        }
      ],
      "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.