Skip to content

fix(solid-query): commit the idle read of a disabled query on the server - #11349

Open
lazerg wants to merge 1 commit into
TanStack:solid-query-v6-prefrom
lazerg:fix/issue-11348-disabled-query-ssr-hang
Open

fix(solid-query): commit the idle read of a disabled query on the server#11349
lazerg wants to merge 1 commit into
TanStack:solid-query-v6-prefrom
lazerg:fix/issue-11348-disabled-query-ssr-hang

Conversation

@lazerg

@lazerg lazerg commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

A useQuery with enabled: false and nothing cached stops an SSR render from ever finishing: no bytes are emitted at all.

In computeData, the pending-idle path for a disabled query returns NEVER, a promise that never settles. That is the right client behavior — the reader parks in the nearest <Loading> until an enabling change, a refetch or a cache write revives it. The server has no later: the render has to finish, and nothing will enable the query or write the cache before it does.

So the server now commits the idle read instead, which is the settled SSR truth for a disabled query and the same contract the meta channel already honors for one. Resolving with undefined was rejected for the v5 line in #8345 because it does not match the shape queryFn returns, and that objection stands on the client, where suspending costs nothing and the query may still start. On the server the alternative is not suspension but a page that never responds, so the type docblock now carries the exception. The client path is untouched.

The hydration fixture grows a disabled query in a boundary of its own, so the regression test covers both sides: the server emits the idle face, and the hydrating client adopts it without fetching. Without the fix the fixture's SSR entry never settles and the whole suite fails.

Fixes #11348

✅ 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).

@coderabbitai

coderabbitai Bot commented Aug 31, 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: Team

Run ID: 680ddef7-6cfe-4420-af97-fe2f3935a984

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.

@lazerg
lazerg force-pushed the fix/issue-11348-disabled-query-ssr-hang branch from a6da2cd to ef0ea76 Compare August 31, 2026 22:59
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