Add pagination support beyond the PostgREST 1,000 row limit

Open
#9 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
supabase, typescript
Domain
api, database

Research direction

Start by tracing the Supabase-backed collection read entry point and reviewing the existing tests, README, and API documentation. Verify how ranges, filters, ordering, limits, offsets, and query metadata are currently passed, then run the test suite. Done means multi-page reads, short final pages, and page errors behave as specified, with documentation covering page size and large-result tradeoffs.

Written by the indexing model from the issue text.

Description

enhancement ready-for-agent

What to build

Add first-class pagination support so Supabase-backed TanStack DB collection reads can fetch more than the PostgREST per-request row limit. Users should not silently receive incomplete collection data when a query matches more than 1,000 rows.

The implementation should fetch data in pages using PostgREST ranges, continuing until the requested limit is satisfied or the final page returns fewer rows than requested. This behavior should work with filters, ordering, explicit limits, offsets, and any cursor/query metadata TanStack DB provides.

The completed issue should include tests and documentation. Loading thousands of rows into a browser can be expensive, so the README/API docs should explain when automatic paging applies, how page size is configured, and when developers should prefer narrower filters or explicit limits.

Acceptance criteria

  • Collection reads can fetch more than 1,000 matching rows.
  • Paging works with filters, ordering, explicit limits, and offsets.
  • Errors from any page fail the full load cleanly.
  • Tests cover multi-page fetch behavior and final short-page behavior.
  • Documentation explains page size, large-result behavior, and performance tradeoffs.

Blocked by

None - can start immediately.

Dominant language
TypeScript
Stars
57
Forks
5
Avg merge
5d 22h
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/tanstack-db

All issues in supabase/tanstack-db

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.