# social.grain.unspecced.getFollowing

> Published by [grain.social](https://lexicon.garden/identity/did:plc:e7rftrdyz5e2rw4y6ocszew2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getFollowing)
- [Documentation](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getFollowing/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getFollowing/examples)

## Definitions

### `social.grain.unspecced.getFollowing#followingItem`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `avatar` | `string` | No |  |
| `description` | `string` | No |  |
| `did` | `string` (did) | Yes |  |
| `displayName` | `string` | No |  |
| `handle` | `string` | No |  |
| `viewer` | `ref` → `social.grain.unspecced.getFollowing#viewerState` | No |  |

### `social.grain.unspecced.getFollowing`

**Type**: `query`

Get users that a given user follows.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `actor` | `string` (at-identifier) | Yes |  |
| `cursor` | `string` | No |  |
| `limit` | `integer` | No |  |
| `viewer` | `string` (did) | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `items` | `array` | No |  |
| `totalCount` | `integer` | No |  |

### `social.grain.unspecced.getFollowing#viewerState`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `following` | `string` (at-uri) | No |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "followingItem": {
      "properties": {
        "avatar": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "handle": {
          "type": "string"
        },
        "viewer": {
          "ref": "social.grain.unspecced.getFollowing#viewerState",
          "type": "ref"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "main": {
      "description": "Get users that a given user follows.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "items": {
              "items": {
                "ref": "social.grain.unspecced.getFollowing#followingItem",
                "type": "ref"
              },
              "type": "array"
            },
            "totalCount": {
              "type": "integer"
            }
          },
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "actor": {
            "format": "at-identifier",
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "viewer": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "actor"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "viewerState": {
      "properties": {
        "following": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "id": "social.grain.unspecced.getFollowing",
  "lexicon": 1
}
```
