mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 15:19:08 +03:00
* chore: remove useExecuteSqlQuery part 1
* fix invalidation
* fixes
* more fixes
* I fixed it, but tested on preview instead of local 🤦🏻
* only refetch table rows and not count on row updates
* removed unneeded invalidations and prefetched new table after create
13 lines
590 B
TypeScript
13 lines
590 B
TypeScript
import type { GetTableRowsArgs } from './table-rows-query'
|
|
|
|
type TableRowKeyArgs = Omit<GetTableRowsArgs, 'table'> & { table?: { id?: number } }
|
|
|
|
export const tableRowKeys = {
|
|
tableRows: (projectRef?: string, { table, ...args }: TableRowKeyArgs = {}) =>
|
|
[projectRef, 'table-rows', table?.id, 'rows', args] as const,
|
|
tableRowsCount: (projectRef?: string, { table, ...args }: TableRowKeyArgs = {}) =>
|
|
[projectRef, 'table-rows', table?.id, 'count', args] as const,
|
|
tableRowsAndCount: (projectRef?: string, tableId?: number) =>
|
|
[projectRef, 'table-rows', tableId] as const,
|
|
}
|