MCPcopy Index your code
hub / github.com/simstudioai/sim / makeOpts

Function makeOpts

apps/sim/hooks/queries/tables.test.ts:351–366  ·  view source on GitHub ↗
(pageSize = PAGE_SIZE, sort: unknown = null)

Source from the content-addressed store, hash-verified

349 const PAGE_SIZE = 1000
350
351 function makeOpts(pageSize = PAGE_SIZE, sort: unknown = null) {
352 return tableRowsInfiniteOptions({
353 workspaceId: WORKSPACE_ID,
354 tableId: TABLE_ID,
355 pageSize,
356 filter: null,
357 sort: sort as never,
358 }) as {
359 queryKey: readonly unknown[]
360 getNextPageParam: (
361 lastPage: { rows: unknown[] },
362 allPages: unknown[],
363 lastPageParam: unknown
364 ) => number | { orderKey: string; id: string } | undefined
365 }
366 }
367
368 it('getNextPageParam returns undefined for a partial page (drain terminates)', () => {
369 const opts = makeOpts()

Callers 1

tables.test.tsFile · 0.85

Calls 1

tableRowsInfiniteOptionsFunction · 0.90

Tested by

no test coverage detected