Skip to content

docs: evaluate Query DB Collection dependency - #24

Open
dhruvxvaishnav wants to merge 1 commit into
supabase:mainfrom
dhruvxvaishnav:docs/query-db-collection-evaluation
Open

dhruvxvaishnav wants to merge 1 commit into
supabase:mainfrom
dhruvxvaishnav:docs/query-db-collection-evaluation

Conversation

@dhruvxvaishnav

Copy link
Copy Markdown
Contributor

Closes #11

Summary

  • documents which responsibilities belong to TanStack DB core, Query DB Collection, and the Supabase adapter today
  • compares keeping, narrowing, and replacing the Query DB Collection integration
  • recommends retaining the dependency behind a narrower internal boundary
  • defines contract-test follow-ups, concrete replacement triggers, and a safe migration outline if those triggers are reached

Recommendation

Keep @tanstack/query-db-collection for now. It owns substantial generic lifecycle behavior, including on-demand subset loading, observer deduplication, row ownership across overlapping queries, result reconciliation, and cleanup. No current Supabase requirement justifies reimplementing that behavior.

The next step should be an internal boundary that isolates query keys, metadata, collection capture, and Query Cache lifecycle hooks without changing supabaseCollectionOptions or user-visible behavior.

Validation

  • pnpm check on Linux with Node 22 and pnpm 9: passed with four pre-existing suppression warnings in src/db.ts
  • pnpm typecheck: passed
  • pnpm test: 277 passed, 9 todo
  • pnpm build: passed
  • git diff --check: passed
  • pnpm test:e2e: not run locally because Docker was unavailable; this is a documentation-only change and the PR workflow runs the end-to-end suite

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate removing the dependency on Query DB Collection

1 participant