# reorderFolderItems

Set the display order of items inside one folder: `orderedItems` (`{ kind, id }`) first to last. TEMPLATE and FORM items are refused (they have no order). Returns how many were ordered.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "reorderFolderItems", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `orderedItems`: `[FolderItemRef!]!` (required). One item, named by what it is and which row it is. Ids are only unique within a kind (`Tag` and `ContactTag` are different tables) so the kind is not decoration, it is half the identity.
  - `kind`: `FoldableKind!` (required, one of `FILTER`, `PROPERTY_LIST`, `CONTACT_LIST`, `TEMPLATE`, `LIBRARY_FILE`, `WORKFLOW_GROUP`, `FORM`). A thing that can live in a folder. One entry per foldable table. Not every kind can do everything: only FILTER can be private (and therefore live in a personal folder), and TEMPLATE has no display order and so cannot be reordered. The server refuses those rather than accepting them silently.
  - `id`: `ID!` (required)

## Response (data, an example)

```json
{
  "folderMutation": {
    "reorderItems": 0
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "reorderFolderItems",
    "variables": {
      "orderedItems": [
        {
          "kind": "FILTER",
          "id": "<id>"
        }
      ]
    }
  }'
```
