# getMemorySubjectNotes

Memory: one subject's notes (`shelf` PERSON with no `subjectId` is yours, TEAM is the organization's, otherwise the subject's id) in reading order (rules, preferences, decisions, procedures, facts …), or with `retired: true` the forgotten ones, each with its kind, whether a person stated it or Goliath derived it, whether it is pinned, and where it was learned. `limit` notes per page (default 100, at most 300); page with `after` = `endCursor` while `hasNextPage`. Null subject when you may not open it. Replaces getMemoryDocument.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "getMemorySubjectNotes", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no
- Result cap: `limit` is clamped to 300, 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.
- `subjectId`: `ID`
- `retired`: `Boolean`
- `limit`: `Int` (default `100`)
- `after`: `String`

## Response (data, an example)

```json
{
  "spacesQuery": {
    "memorySubject": {
      "shelf": "PERSON",
      "subjectId": "<ID>",
      "name": "…",
      "noteCount": 0,
      "updatedAt": "2026-01-01T00:00:00.000Z",
      "lastDreamAt": "2026-01-01T00:00:00.000Z"
    },
    "memoryNotes": {
      "notes": [
        {
          "id": "<ID>",
          "kind": "RULE",
          "text": "…",
          "origin": "STATED",
          "pinned": true,
          "retired": true,
          "source": {
            "kind": "TEAMMATE",
            "name": "…",
            "contactId": "<ID>"
          },
          "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": "getMemorySubjectNotes",
    "variables": {
      "shelf": "PERSON"
    }
  }'
```
