# so.sprk.graph.getRelationships

> Published by [sprk.so](https://lexicon.garden/identity/did:plc:cveom2iroj3mt747sd4qqnr2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/so.sprk.graph.getRelationships)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/so.sprk.graph.getRelationships/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cveom2iroj3mt747sd4qqnr2/so.sprk.graph.getRelationships/examples)

## Definitions

### `so.sprk.graph.getRelationships`

**Type**: `query`

Enumerates public relationships between one account, and a list of other accounts. Does not require auth.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `actor` | `string` (at-identifier) | Yes | Primary account requesting relationships for. |
| `others` | `array` | No | List of 'other' accounts to be related back to the primary. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `actor` | `string` (did) | No |  |
| `relationships` | `array` | Yes |  |

#### Errors

- **ActorNotFound**: the primary actor at-identifier could not be resolved

## Raw Schema

```json
{
  "id": "so.sprk.graph.getRelationships",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "ActorNotFound",
          "description": "the primary actor at-identifier could not be resolved"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "relationships"
          ],
          "properties": {
            "actor": {
              "type": "string",
              "format": "did"
            },
            "relationships": {
              "type": "array",
              "items": {
                "refs": [
                  "so.sprk.graph.defs#relationship",
                  "so.sprk.graph.defs#notFoundActor"
                ],
                "type": "union"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "actor"
        ],
        "properties": {
          "actor": {
            "type": "string",
            "format": "at-identifier",
            "description": "Primary account requesting relationships for."
          },
          "others": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "at-identifier"
            },
            "maxLength": 30,
            "description": "List of 'other' accounts to be related back to the primary."
          }
        }
      },
      "description": "Enumerates public relationships between one account, and a list of other accounts. Does not require auth."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
