fix(solid-query): deprecate create in favor of use, and add full docs - #8950
Merged
Conversation
This reverts commit 8f84606.
|
View your CI Pipeline Execution ↗ for commit 121daeb.
☁️ Nx Cloud last updated this comment at |
Contributor
|
Sizes for commit 121daeb:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8950 +/- ##
===========================================
+ Coverage 44.07% 79.70% +35.62%
===========================================
Files 200 16 -184
Lines 8021 335 -7686
Branches 1760 63 -1697
===========================================
- Hits 3535 267 -3268
+ Misses 4058 56 -4002
+ Partials 428 12 -416
🚀 New features to boost your workflow:
|
1 task
incognitojam
added a commit
to commaai/new-connect
that referenced
this pull request
Apr 13, 2025
create* has been deprecated in solid-query TanStack/query#8950
This was referenced Feb 4, 2026
ryansolid
added a commit
to ryansolid/query
that referenced
this pull request
Aug 27, 2026
…ck#8950 deprecation The create*/Create* names were kept as a migration bridge when v5 made use* canonical (TanStack#8950 deprecated them). This major already rewrites every callsite's semantics, so the bridge retires: use* is the only naming, matching the docs. Co-authored-by: Cursor <cursoragent@cursor.com>
birkskyum
pushed a commit
that referenced
this pull request
Aug 28, 2026
…model (#11308) * feat(solid-query): rewrite the adapter onto Solid 2's native async model Reads become a single async memo over the query cache (suspends into <Loading>, holds previous data through refetches, routes rejections to <Errored>, serializes settled values for streaming hydration); mutations ride Solid core's `action` primitive with transactional settle and optimistic overlays; cross-cache hooks share a dual-write aggregate with a hydration latch. The observer notification/store layer (createStore/reconcile, tracking proxies, notifyManager batching) is deleted — QueryObserver/MutationObserver remain as lifecycle/policy engines with noop listeners. Breaking: result `data` is non-optional (reads suspend instead of returning undefined), mutateAsync is removed (mutate returns a promise), and the reconcile/suspense/deferStream options are removed. SSR contracts pinned by the fixture suite: settled-only serialization for every exposed field, hydration id parity, no fetches inside the hydration/restore windows, and hydration-latched cross-cache aggregates. Validated against solid-js 2.0.0-rc.0 and rc.3, including an end-to-end template run with single-flight mutations. Co-authored-by: Cursor <cursoragent@cursor.com> * ci: apply automated fixes * feat(solid-query): wire deferStream through to Solid's per-computation SSR option deferStream was declared in the option types on this line but wired to nothing. Solid 2 exposes it as a creation-time memo option, so pass it straight through to the data node: the server holds the stream flush until the query resolves instead of flushing the surrounding boundary's fallback. Server-only; ignored on the client. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(solid-query): serve data through an auto-reconciling store projection Solid 2 projections auto-reconcile their returns by key, so the data face becomes a store: deep reads are fine-grained and item identity survives across refetches (keyed by the new `reconcile` option, default 'id'). The async memo remains the SSR/hydration spine underneath; the projection derive is inert on the server — server projections run eagerly at creation, so a live derive would fetch at hook creation and serialize a duplicate payload, and the serialized entry would latch the hydrating client's projection for the whole stream. With nothing serialized the client projection computes live through the hydration window. Rewrites the structural-sharing test to the stronger store contract and adds leaf-granularity, custom-key, and primitive-data semantics tests. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(solid-query): green up CI for the native rewrite - align @solidjs/web, babel-preset-solid and solid-js dev ranges across the solid packages (sherif flagged the split, and devtools/persist-client were resolving a second solid-js copy) - drop the unused `export` on the internal BaseQueryLayer seam (knip) - port the PersistQueryClientProvider suite to the 2.0 read layer: a query with nothing cached now suspends for the whole restore window, so the tests assert the visible fallback -> restored -> refreshed transitions and the fetch/callback bookkeeping instead of observer result snapshots Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * refactor(solid-query): unify the data node into a single hybrid projection Collapse the three-node data face (serialized async memo + transparent hydration memo + client-only projection) into one createProjection with an identical derive on both sides — the Solid Router feed-query-into- projection shape. The engine owns SSR serialization (deferStream rides the projection now), suspense, hydration adoption, and keyed reconciliation. ssrSource 'hybrid' keeps hydrated components live: the serialized value claims the DOM and the derive re-takes over from the live cache per hydrated region. A per-hook `primed` signal gates the pull-model fetch so the hydration takeover recompute cannot race data the channel is about to deliver (SSR-errored queries fall through and fetch normally once the channel declines them). Co-authored-by: Cursor <cursoragent@cursor.com> * refactor(solid-query): default ('server') hydration semantics for the data node Drop ssrSource 'hybrid' from the data projection: query data IS server-serialized truth, so the serialized value owns the DOM for the whole hydration window. Mid-stream cache writes commit when the stream closes through Solid's hydration-end divergence takeover (solid-js > 2.0.0-rc.3 — earlier engines lose a latched node's mid-stream divergence instead of deferring it). Network activity is unchanged: observers attach per-query as the channel primes, so mid-stream invalidations still refetch immediately; only the DOM commit defers to hydration end. Co-authored-by: Cursor <cursoragent@cursor.com> * refactor(solid-query): single-channel hydration — the node payload is the transport Delete the provider-owned dehydration channel and its coordinator. The data projection's serialized root now carries the cache facts hydration needs ({ value, t: dataUpdatedAt, raw?: pre-select data }); on a hydrated mount each hook peeks its projection's node id, loads that entry itself, primes the query cache through query-core hydrate() (staleness intact, newer-wins, silent under external pre-priming), and attaches its observer per query as chunks land. One serialization story, engine-owned; ~240 lines deleted. Requires solid-js > 2.0.0-rc.3 (peekNextChildId export). Co-authored-by: Cursor <cursoragent@cursor.com> * chore(solid-query): drop internal porting notes from the tree Co-authored-by: Cursor <cursoragent@cursor.com> * refactor(solid-query): content-addressed hydration transfer (router query() pattern) Serialize cache entries under sq:<queryHash> at fetch-dispatch time (provider-side, promise-valued so streaming settles ride the payload) instead of tying transfer to a rendered node's positional id. Client hooks look their own hash up and prime through query-core hydrate(); the registry outlives the hydration window, so prefetched-never-rendered queries transfer and late mounts (lazy routes, post-hydration navigation) adopt the server payload instead of refetching — restoring full cache-level dehydration coverage with less machinery. Priming moved ahead of the attach render effect (its effect half runs synchronously inside an active flush, and mount policy against a cold cache would refetch). Drops the peekNextChildId dependency; the data root reverts to { value }. Co-authored-by: Cursor <cursoragent@cursor.com> * chore(solid-query): drop internal porting notes from the tree Co-authored-by: Cursor <cursoragent@cursor.com> * refactor(solid-query)!: remove create* aliases, completing the #8950 deprecation The create*/Create* names were kept as a migration bridge when v5 made use* canonical (#8950 deprecated them). This major already rewrites every callsite's semantics, so the bridge retires: use* is the only naming, matching the docs. Co-authored-by: Cursor <cursoragent@cursor.com> * ci: apply automated fixes * refactor(solid-query)!: drop isInitialLoading (deprecated alias of isLoading) Core deprecated it in favor of isLoading; the adapter's getter was byte-identical. Result types now omit it (distributively over the Defined result unions so status discriminants survive), and useBaseQuery declares the adapter's own result face instead of the core union. Co-authored-by: Cursor <cursoragent@cursor.com> * chore(solid-query): require solid-js >= 2.0.0-rc.4 rc.4 is published and carries the hydration-end divergence takeover the adapter's streaming hydration relies on. Bump the peer range and dev dep off the locally-built solid and onto the released bits; full suite (344 adapter + 7 persist-client tests, typecheck) green against published rc.4. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Brenley Dueck <brenleydueck@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
No description provided.