# pub.chive.graph.getRelations

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.graph.getRelations)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.graph.getRelations/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.graph.getRelations/examples)

## Definitions

### `pub.chive.graph.getRelations`

**Type**: `query`

List available relation types (nodes with subkind=relation)

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `relations` | `array` | Yes | Available relation types |

### `pub.chive.graph.getRelations#relationType`

**Type**: `object`

Relation type definition

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `slug` | `string` | Yes | Relation slug identifier |
| `label` | `string` | Yes | Display label |
| `description` | `string` | No | Relation description |
| `inverseSlug` | `string` | No | Slug of inverse relation |

## Raw Schema

```json
{
  "id": "pub.chive.graph.getRelations",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "relations"
          ],
          "properties": {
            "relations": {
              "type": "array",
              "items": {
                "ref": "#relationType",
                "type": "ref"
              },
              "description": "Available relation types"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {}
      },
      "description": "List available relation types (nodes with subkind=relation)"
    },
    "relationType": {
      "type": "object",
      "required": [
        "slug",
        "label"
      ],
      "properties": {
        "slug": {
          "type": "string",
          "description": "Relation slug identifier"
        },
        "label": {
          "type": "string",
          "description": "Display label"
        },
        "description": {
          "type": "string",
          "description": "Relation description"
        },
        "inverseSlug": {
          "type": "string",
          "description": "Slug of inverse relation"
        }
      },
      "description": "Relation type definition"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
