Custom Cache Updates¶
Sometimes, you will find yourself writing custom cache updates. The library exports two convenience hooks that expose the underlying cache operations.
Danger
These hooks do not do any API requests. They only update the local cache.
useDeleteItem¶
Delete a postgrest entity from the cache. Note that you have to pass a value for all primary keys in the input.
useUpsertItem¶
Upsert a postgrest entity into the cache. Note that you have to pass a value for all primary keys in the input.
useRevalidateTables¶
Revalidate all queries for the given tables.