# listMemorySubjects

Memory: one list shelf's subjects (EMPLOYEE or CONTACT: the AI employees or contacts Goliath remembers things about; contacts only as the CRM lets the key owner open them), newest first, with how many notes each holds; `query` narrows by name. Page with `after` = `endCursor` while `hasNextPage`. Each `subjectId` opens with getMemorySubjectNotes. Replaces listMemoryNamespaces.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "listMemorySubjects", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no
- Result cap: `limit` is clamped to 100, without an error

## Variables

- `shelf`: `SpacesMemoryShelf!` (required, one of `PERSON`, `TEAM`, `EMPLOYEE`, `CONTACT`, `PROJECT`). A shelf of the Library's Memory page (Memory v2): where a note lives. PERSON is a person's own shelf ("You"); TEAM is the organization's. PROJECT is the dev fleet's, and opens only to Goliath admins. A teammate's PERSON shelf opens to everyone, written only by them and Goliath admins.
- `query`: `String`
- `limit`: `Int` (default `50`)
- `after`: `String`

## Response (data, an example)

```json
{
  "spacesQuery": {
    "memorySubjects": {
      "subjects": [
        {
          "shelf": "PERSON",
          "subjectId": "<ID>",
          "name": "…",
          "noteCount": 0,
          "updatedAt": "2026-01-01T00:00:00.000Z"
        }
      ],
      "endCursor": "…",
      "hasNextPage": true
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "listMemorySubjects",
    "variables": {
      "shelf": "PERSON"
    }
  }'
```
