Skip to content

docs(db): fix broken code examples in release posts - #1376

Merged
tannerlinsley merged 5 commits into
TanStack:mainfrom
KyleAMathews:codex/db-blog-promise-corrections
Oct 13, 2026
Merged

tannerlinsley merged 5 commits into
TanStack:mainfrom
KyleAMathews:codex/db-blog-promise-corrections

Conversation

@KyleAMathews

@KyleAMathews KyleAMathews commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add the required queryClient and getKey options to Query Collection examples.
  • Replace the nonexistent createQueryCollection calls with createCollection(queryCollectionOptions(...)).
  • Fix the join callback arguments and Electric collection options in the 0.5 examples.
  • Replace the undefined fetchNextPage() call with a live-query window that loads the next 10 rows.

Only code examples change. The posts' prose, headings, excerpts, and publication metadata are unchanged.

Checks

  • Site content collection build and formatter check passed before the load-more example update.
  • The load-more window was verified against a Query Collection request trace.
  • git diff --check passed.

Summary by CodeRabbit

  • Documentation
    • Updated TanStack DB guides with revised examples for query-backed collections, including normalized data, persistence, and on-demand loading.
    • Refreshed join and pagination examples to show current usage patterns.
    • Updated cache-policy and progressive-sync examples to reflect current collection configuration options.

@changeset-bot

changeset-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cc7b841

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 93776215-3e82-4a65-a62f-5f3bb2bbb6c1
📥 Commits

Reviewing files that changed from the base of the PR and between de92ae2 and cc7b841.

📒 Files selected for processing: 3
  • src/blog/tanstack-db-0.1-the-embedded-client-database-for-tanstack-query.md
  • src/blog/tanstack-db-0.5-query-driven-sync.md
  • src/blog/tanstack-db-0.6-app-ready-with-persistence-and-includes.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

Three TanStack DB articles update examples for collection setup, query-driven sync, pagination, Electric integration, and persistence. The examples now use updated collection options, query client configuration, key selectors, and join callback arguments.

Changes: TanStack DB articles

Layer / File(s) Summary
Embedded collection setup
src/blog/tanstack-db-0.1-the-embedded-client-database-for-tanstack-query.md
The examples use createCollection with queryCollectionOptions, a shared QueryClient, and key selectors for todo, user, and project collections.
Query-driven sync examples
src/blog/tanstack-db-0.5-query-driven-sync.md
The examples update join callback arguments and collection options. The pagination example uses a live query collection and setWindow, and the Electric example uses shapeOptions.url and a todo key selector.
Persisted collection setup
src/blog/tanstack-db-0.6-app-ready-with-persistence-and-includes.md
The persisted shopping-items collection example creates a QueryClient and passes it to queryCollectionOptions.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to cc7b8

The review evidence identifies no actionable regression in the updated article examples and no merge-blocking issue.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies the main change: fixing broken database code examples in the release posts. It is concise and specific.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@KyleAMathews
KyleAMathews marked this pull request as draft October 13, 2026 19:44
@KyleAMathews KyleAMathews changed the title docs(db): correct release blog examples and product claims docs(db): fix broken code examples in release posts Oct 13, 2026
@KyleAMathews
KyleAMathews marked this pull request as ready for review October 13, 2026 19:55
@tannerlinsley
tannerlinsley merged commit c0d2195 into TanStack:main Oct 13, 2026
7 checks passed
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.

2 participants