Skip to content

fix(solid-query): resolve query client outside memos#10571

Draft
KimHyeongRae0 wants to merge 1 commit intoTanStack:mainfrom
KimHyeongRae0:fix/10445-solid-query-client-resolver
Draft

fix(solid-query): resolve query client outside memos#10571
KimHyeongRae0 wants to merge 1 commit intoTanStack:mainfrom
KimHyeongRae0:fix/10445-solid-query-client-resolver

Conversation

@KimHyeongRae0
Copy link
Copy Markdown
Contributor

Changes

Closes #10445.

Solid hooks no longer call useQueryClient from inside createMemo. useQueryClientResolver captures QueryClientContext at hook top level, then affected hooks call the returned accessor from memos.

This keeps explicit queryClient accessors reactive and leaves the existing useQueryClient(client) API unchanged.

Checklist

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

Local verification:

  • pnpm --filter @tanstack/solid-query test:lib
  • pnpm --filter @tanstack/solid-query test:types:tscurrent
  • pnpm --filter @tanstack/solid-query test:eslint

Release Impact

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 25, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 51912ed9-36f6-49a5-83c2-3e3eb1b3d216

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 25, 2026

View your CI Pipeline Execution ↗ for commit 9e204dc

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

☁️ Nx Cloud last updated this comment at 2026-04-25 01:46:09 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 25, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 9e204dc

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useQueryClient / useContext runs inside createMemo, breaking Solid rules and causing undefined QueryClient (e.g. defaultQueryOptions on lazy routes)

1 participant