fix(solid-query): finish SSR when reading a disabled query - #11449
Open
mgarcialeniolabs wants to merge 1 commit into
Open
fix(solid-query): finish SSR when reading a disabled query#11449mgarcialeniolabs wants to merge 1 commit into
mgarcialeniolabs wants to merge 1 commit into
Conversation
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>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Changes
useQuery({ enabled: false })whose.datais read during render never lets a Solid SSR render finish at 6.0.0-rc.1+. The stream emits nothing.computeDatahands the datacreateProjectionNEVERwhen 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
NEVERguards are already unreachable on the server. This last one was not. The server now commits the idle value (undefineddata,pendingstatus) instead of parking, which is the contractserverMetaalready honours for a disabled query and the state the client hydrates to.selectis 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
pnpm nx run @tanstack/solid-query:test:lib(359 passed, 1 skipped), plus eslint, types, knip, and prettier on the changed files.🚀 Release Impact
Made with Cursor