# EAV Hooks — BrandApp Playground

> Query and mutation hooks for EAV records, each invalidating the records cache after a write.

- Canonical page: https://brandapp-playground.vercel.app/hooks/eav
- Markdown: https://brandapp-playground.vercel.app/hooks/eav.md
- SDK module: `@reopt-ai/brandapp-sdk/react/hooks`

## Hooks

- `useEavRecords(sdk, entityId, query?)`
- `useCreateRecord(sdk, entityId)`
- `useUpdateRecord(sdk, entityId)` — `mutate({ recordId, input })`
- `useDeleteRecord(sdk, entityId)` — `mutate(recordId)`
- `useUpsertRecord(sdk, entityId)` — update-or-create by filters
- `useBulkCreateRecords(sdk, entityId)` — up to 100 records per call
- `useDeleteRecordsWhere(sdk, entityId)` — delete everything matching a filter

The demo visualizes the React Query lifecycle — `status`, `fetchStatus`, staleness, and
cache state — so you can see exactly when invalidation fires.

## Related

- [Records](https://brandapp-playground.vercel.app/eav/records.md)
- [React Hooks Overview](https://brandapp-playground.vercel.app/hooks.md)

---

Index of every document: https://brandapp-playground.vercel.app/llms.txt
Single-file copy: https://brandapp-playground.vercel.app/llms-full.txt
HTTP API description: https://brandapp-playground.vercel.app/openapi.json
