Skip to content

docs(vue-query/guides/ssr): fix 'queryKey' to use array form - #11202

Merged
sukvvon merged 1 commit into
mainfrom
docs/fix-vue-ssr-querykey-array
Aug 16, 2026
Merged

docs(vue-query/guides/ssr): fix 'queryKey' to use array form#11202
sukvvon merged 1 commit into
mainfrom
docs/fix-vue-ssr-querykey-array

Conversation

@sukvvon

@sukvvon sukvvon commented Aug 16, 2026

Copy link
Copy Markdown
Member

🎯 Changes

Fixes queryKey: 'todos2' (a string) to queryKey: ['todos2'] (an array) in the second useQuery example in the Nuxt 2 SSR guide. QueryKey is typed as ReadonlyArray<unknown> (packages/query-core/src/types.ts), and the first useQuery call in the same snippet correctly uses queryKey: ['todos'].

This traces back to the v5 migration of this guide (#8001), where the original v4 call useQuery("todos2", getTodos) — v4 allowed a bare string key — was converted to v5's object form but the key wasn't wrapped in an array.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

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

Summary by CodeRabbit

  • Documentation
    • Updated the Nuxt 2 server-side rendering example to use the recommended array format for query keys.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 886eda35-3b31-4aab-81ed-d73cd5277f0c

📥 Commits

Reviewing files that changed from the base of the PR and between b36374c and 7a84f6a.

📒 Files selected for processing (1)
  • docs/framework/vue/guides/ssr.md

Included review availability: Your plan includes up to 10 reviews per rolling hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The Nuxt 2 SSR example now uses an array query key for the second todos2 query.

Changes

Nuxt 2 SSR example

Layer / File(s) Summary
Update the SSR query key
docs/framework/vue/guides/ssr.md
The second query changes from the string key 'todos2' to the array key ['todos2'].

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 7a84f

This is a localized documentation correction with no published-code or runtime impact, and no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the documentation change to use array syntax for the query key.
Description check ✅ Passed The description explains the change and motivation, completes the checklist, and identifies the change as documentation-only.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 PR with unit tests
  • Commit unit tests in branch docs/fix-vue-ssr-querykey-array

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.

@nx-cloud

nx-cloud Bot commented Aug 16, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 7a84f6a

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

☁️ Nx Cloud last updated this comment at 2026-08-16 18:10:31 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@sukvvon sukvvon self-assigned this Aug 16, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 16, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@11202

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 7a84f6a

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 12.15 KB (0%)
react minimal 9.1 KB (0%)

@sukvvon
sukvvon merged commit 0785da5 into main Aug 16, 2026
9 checks passed
@sukvvon
sukvvon deleted the docs/fix-vue-ssr-querykey-array branch August 16, 2026 18:24
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