Skip to content

fix(solid-query): attach 'useQueries' through the provider's hydration channel - #11186

Open
lazerg wants to merge 1 commit into
TanStack:solid-query-v6-prefrom
lazerg:fix/issue-11185-usequeries-hydration-channel
Open

fix(solid-query): attach 'useQueries' through the provider's hydration channel#11186
lazerg wants to merge 1 commit into
TanStack:solid-query-v6-prefrom
lazerg:fix/issue-11185-usequeries-hydration-channel

Conversation

@lazerg

@lazerg lazerg commented Aug 14, 2026

Copy link
Copy Markdown

🎯 Changes

useQueries never got the hydration coordination that #11168 added to useBaseQuery. It builds its own QueriesObserver and subscribes from an effect, so a component that hydrates before its dehydrated entries have arrived on the SSR stream attaches to a cold cache and refetches on mount, even for data that is well inside staleTime.

The subscription now goes through the same coordinator. With a provider in place, useQueries attaches once every one of its queries has been primed, or once the channel reports itself done. One QueriesObserver covers all of the queries, so it can only attach when the last one is ready. QueryClientProvider closes the channel right away on a fresh client mount, detected with the same Promise executor probe useBaseQuery uses, so an app without SSR never waits.

For the test, the streaming fixture gains a useQueries in the shell whose query settles after the slow boundary, so its entry only rides the final flush. Before the change it refetches at shell hydration.

Fixes #11185

✅ Checklist

Local verification: vitest run on solid-query (330 tests), solid-query-persist-client and solid-query-devtools, all green with no type errors; eslint and prettier clean.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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 Plus

Run ID: 31b0fc73-cce1-4855-b023-b7ac53a93a8e

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

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.

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