Skip to content

refactor(query-core)!: make infinite fetching independently importable - #12666

Closed
TkDodo wants to merge 4 commits into
query-v6from
tkdodo/ref/v6-infinite-fetch-behavior
Closed

TkDodo wants to merge 4 commits into
query-v6from
tkdodo/ref/v6-infinite-fetch-behavior

Conversation

@TkDodo

@TkDodo TkDodo commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

🎯 Changes

Use infiniteQuery(client, options) in place of client.infiniteQuery(options). The infinite observer, imperative function, and hydration install pagination behavior on the cached query. A restored infinite query can still refetch before an observer mounts. The Vue export accepts reactive options.

Local Size Limit against query-v6 at 9f0ca4b16, Brotli 11. Both checks pass.

Entry Base This PR
React minimal 9,126 B 8,620 B (−506 B, −5.5%)
React full 12,512 B 12,531 B (+19 B, +0.2%)

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I have followed the AI contribution policy and fully understand the code I am submitting.

Query Core, Vue, React, and Preact tests passed, including their type tests. Lit ran 307 passing tests and reported a local typecheck write error. A separate Lit source and test typecheck passed. The full test:pr command was unavailable in the local worktrees.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@changeset-bot

changeset-bot Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 287f9ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@tanstack/query-core Major
@tanstack/react-query Major
@tanstack/preact-query Major
@tanstack/vue-query Major
@tanstack/angular-query Major
@tanstack/lit-query Patch
@tanstack/query-async-storage-persister Major
@tanstack/query-broadcast-client-experimental Major
@tanstack/query-devtools Major
@tanstack/query-persist-client-core Major
@tanstack/solid-query Major
@tanstack/svelte-query Patch
@tanstack/react-query-devtools Major
@tanstack/react-query-next-experimental Major
@tanstack/react-query-persist-client Major
@tanstack/preact-query-devtools Major
@tanstack/preact-query-persist-client Major
@tanstack/vue-query-devtools Patch
@tanstack/angular-query-devtools Major
@tanstack/angular-query-persist-client Major
@tanstack/solid-query-devtools Major
@tanstack/svelte-query-devtools Patch
@tanstack/solid-query-persist-client Major
@tanstack/svelte-query-persist-client Patch
@tanstack/eslint-plugin-query Major

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

@nx-cloud

nx-cloud Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 287f9ab

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 8m 58s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 35s View ↗

☁️ Nx Cloud last updated this comment at 2026-11-22 11:21:41 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

17 package(s) bumped directly, 8 bumped as dependents.

🟥 Major bumps

Package Version Reason
@tanstack/angular-query 5.108.2 → 6.0.0 Changeset
@tanstack/angular-query-devtools 5.108.2 → 6.0.0 Changeset
@tanstack/preact-query 5.108.2 → 6.0.0 Changeset
@tanstack/preact-query-devtools 5.108.2 → 6.0.0 Changeset
@tanstack/preact-query-persist-client 5.108.2 → 6.0.0 Changeset
@tanstack/query-core 5.108.2 → 6.0.0 Changeset
@tanstack/query-devtools 5.108.2 → 6.0.0 Changeset
@tanstack/query-persist-client-core 5.108.2 → 6.0.0 Changeset
@tanstack/react-query 5.108.2 → 6.0.0 Changeset
@tanstack/react-query-devtools 5.108.2 → 6.0.0 Changeset
@tanstack/solid-query 5.108.2 → 6.0.0 Changeset
@tanstack/solid-query-devtools 5.108.2 → 6.0.0 Changeset
@tanstack/svelte-query 6.4.5 → 7.0.0 Changeset
@tanstack/svelte-query-devtools 6.4.5 → 7.0.0 Changeset
@tanstack/vue-query 5.108.2 → 6.0.0 Changeset
@tanstack/vue-query-devtools 6.4.5 → 7.0.0 Changeset
@tanstack/angular-query-persist-client 5.108.2 → 6.0.0 Dependent
@tanstack/eslint-plugin-query 5.108.2 → 6.0.0 Dependent
@tanstack/query-async-storage-persister 5.108.2 → 6.0.0 Dependent
@tanstack/query-broadcast-client-experimental 5.108.2 → 6.0.0 Dependent
@tanstack/react-query-next-experimental 5.108.2 → 6.0.0 Dependent
@tanstack/react-query-persist-client 5.108.2 → 6.0.0 Dependent
@tanstack/solid-query-persist-client 5.108.2 → 6.0.0 Dependent
@tanstack/svelte-query-persist-client 6.4.5 → 7.0.0 Dependent

🟩 Patch bumps

Package Version Reason
@tanstack/lit-query 0.2.42 → 0.2.43 Changeset

@pkg-pr-new

pkg-pr-new Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
More templates

@tanstack/angular-query

npm i https://pkg.pr.new/@tanstack/angular-query@12666

@tanstack/angular-query-devtools

npm i https://pkg.pr.new/@tanstack/angular-query-devtools@12666

@tanstack/angular-query-persist-client

npm i https://pkg.pr.new/@tanstack/angular-query-persist-client@12666

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@12666

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@12666

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@12666

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@12666

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@12666

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@12666

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@12666

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@12666

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@12666

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@12666

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@12666

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@12666

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@12666

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@12666

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@12666

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@12666

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@12666

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@12666

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@12666

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@12666

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@12666

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@12666

commit: 31055dc

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 12.24 KB (+0.2% 🔺)
react minimal 7.81 KB (-6.03% 🔽)

@TkDodo TkDodo closed this Nov 22, 2026
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.

1 participant