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

# relationDefinitions

> Lists the tenant's relation definitions, archived ones included, newest first unless `order` says otherwise. `where` filters on raw ids (`id`, `sourceCardDefinitionId`, `targetCardDefinitionId`) and can't filter on `isDeleted`.



**query** `relationDefinitions(after: String, before: String, first: Int, last: Int, order: [RelationDefinitionSortInput!], where: RelationDefinitionFilterInput): RelationDefinitionsConnection`

## Arguments

**`after`**: `String`

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

---

**`before`**: `String`

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

---

**`first`**: `Int`

Returns the first _n_ elements from the list.

---

**`last`**: `Int`

Returns the last _n_ elements from the list.

---

**`order`**: `[RelationDefinitionSortInput!]`

---

**`where`**: `RelationDefinitionFilterInput`

## Returns

`RelationDefinitionsConnection`

**`edges`**: `[RelationDefinitionsEdge!]`

A list of edges.

---

**`nodes`**: `[RelationDefinition!]`

A flattened list of the nodes.

---

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

Information to aid in pagination.

---

**`totalCount`**: `Int!`

Identifies the total count of items in the connection.

## Examples

```graphql Query
query RelationDefinitions {
  relationDefinitions {
    edges {
      cursor
      node {
        createdAt
        createdByUser
        description
        displayCategory
        endpoints {
          __typename
        }
        id
      }
    }
    nodes {
      createdAt
      createdByUser
      description
      displayCategory
      endpoints {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
        totalCount
      }
      id
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
    totalCount
  }
}
```

```json Response
{
  "data": {
    "relationDefinitions": {
      "edges": [
        {
          "cursor": "string",
          "node": {
            "createdAt": "value",
            "createdByUser": "value",
            "description": "string",
            "displayCategory": "DEFAULT",
            "endpoints": {
              "__typename": "EndpointsConnection"
            },
            "id": "id"
          }
        }
      ],
      "nodes": [
        {
          "createdAt": "value",
          "createdByUser": "value",
          "description": "string",
          "displayCategory": "DEFAULT",
          "endpoints": {
            "edges": [
              {
                "__typename": "EndpointsEdge"
              }
            ],
            "nodes": [
              {
                "__typename": "Endpoint"
              }
            ],
            "pageInfo": {
              "__typename": "PageInfo"
            },
            "totalCount": 1
          },
          "id": "id"
        }
      ],
      "pageInfo": {
        "endCursor": "string",
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "string"
      },
      "totalCount": 1
    }
  }
}
```


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