Skip to content

fix(solid-query): finish SSR when reading a disabled query - #11449

Open
mgarcialeniolabs wants to merge 1 commit into
TanStack:solid-query-v6-prefrom
mgarcialeniolabs:issue-11348
Open

fix(solid-query): finish SSR when reading a disabled query#11449
mgarcialeniolabs wants to merge 1 commit into
TanStack:solid-query-v6-prefrom
mgarcialeniolabs:issue-11348

Conversation

@mgarcialeniolabs

Copy link
Copy Markdown

🎯 Changes

useQuery({ enabled: false }) whose .data is read during render never lets a Solid SSR render finish at 6.0.0-rc.1+. The stream emits nothing.

computeData hands the data createProjection NEVER when the query is disabled, pending, idle, and uncached. That parking is the intended client behaviour: the reader suspends into the nearest <Loading> until an enable, refetch, or cache write revives the compute. On the server there is no later, so the render never completes.

The three earlier NEVER guards are already unreachable on the server. This last one was not. The server now commits the idle value (undefined data, pending status) instead of parking, which is the contract serverMeta already honours for a disabled query and the state the client hydrates to. select is not invoked on absent data. Client behaviour is unchanged.

Adds a boundary-less SSR fixture that matches the reporter's reproduction, so a regression fails as an assertion rather than hanging the suite.

Fixes #11348

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm nx run @tanstack/solid-query:test:lib (359 passed, 1 skipped), plus eslint, types, knip, and prettier on the changed files.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

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

Made with Cursor

A disabled query with nothing cached parked the data node on NEVER, so a server render that read .data never finished. Commit the idle value on the server instead; client parking is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 8, 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: Advanced

Run ID: bd962158-a69c-48cc-8e2f-eedba0b6c7b2

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.

2 participants