Investigate removing the dependency on Query DB Collection

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
supabase, typescript

Research direction

No file, test, or entry point is named. Start by tracing the Supabase collection adapter and its use of @tanstack/query-db-collection, then compare keeping, wrapping, and replacing that dependency. Done means documenting its current role, Supabase-specific tradeoffs, a recommendation, and a safe follow-up plan if removal is advised.

Written by the indexing model from the issue text.

Description

enhancement ready-for-agent

What to build

Investigate whether the Supabase collection adapter should continue depending on @tanstack/query-db-collection, wrap it more narrowly, or replace it with a direct TanStack DB collection implementation.

The current dependency provides a useful bridge between TanStack Query and TanStack DB, but it may also constrain Supabase-specific behavior such as Realtime subscription lifecycle, PostgREST pagination, optimistic writes, rollback, and future offline support. This issue should evaluate whether the dependency is still the right foundation as the adapter matures.

The outcome should be a design recommendation, not a large refactor by default. If removal is recommended, document the smallest safe migration path, expected public API changes, test coverage needed, and whether users should observe any behavior changes.

Acceptance criteria

  • Explain what @tanstack/query-db-collection provides to this adapter today.
  • Identify the Supabase-specific behaviors it helps or constrains.
  • Compare keeping it, wrapping it, and replacing it with a direct adapter.
  • Recommend a path forward with tradeoffs.
  • If removal is recommended, outline a safe follow-up implementation plan.

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.