Skip to content

Add pagination support beyond the PostgREST 1,000 row limit #9

Description

@ivasilov

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions