Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .changeset/solid-query-native-rewrite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
'@tanstack/solid-query': major
---

feat: rewrite the adapter onto Solid 2.0's native async model. Query reads
are now a single async computation (suspends into `<Loading>`, holds
previous data through refetches, routes rejections to `<Errored>`,
serializes settled values for streaming hydration) served through an
auto-reconciling store projection — deep reads are fine-grained and item
identity survives across fetches (keyed by the `reconcile` option, default
`'id'`). Mutations ride Solid core's `action` primitive (transactional
settle, optimistic overlays, callbacks inside the transaction). The
observer notification/store layer is deleted —
`QueryObserver`/`MutationObserver` remain as lifecycle/policy engines only.
Hydration is single-channel and content-addressed (the Solid Router
`query()` pattern): the provider serializes every query the request
touches into Solid's hydration registry under `sq:<queryHash>` at
fetch-dispatch time, each client hook primes the query cache from its own
hash entry through query-core `hydrate()`, prefetched-never-rendered
queries transfer, late mounts adopt past hydration end, and the
provider-owned dehydration channel is deleted. Requires solid-js >
2.0.0-rc.3 (hydration-end divergence takeover).

Breaking: `data` is non-optional on query results (reads suspend instead of
returning `undefined`) and is a readonly store view; `mutateAsync` removed
(`mutate` returns a promise); `reconcile` is now the reconciliation key for
the data store (`string | (item => any) | null`, default `'id'` — the v5
function form is gone, core auto-reconciles); `suspense` option removed
(suspension is the model, boundaries are the control point); the `create*`
runtime and `Create*` type aliases are removed, completing the deprecation
from #8950 — `use*` is the only naming. `deferStream` is now implemented
(it was declared but unwired on the v6 line): it passes through to Solid's
per-computation `deferStream` memo option.
6 changes: 3 additions & 3 deletions packages/solid-query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
"@solidjs/signals": "^2.0.0-rc.0",
"@solidjs/testing-library": "^0.8.10",
"@solidjs/vite-plugin": "^3.0.0-next.27",
"@solidjs/web": "^2.0.0-rc.0",
"@solidjs/web": "^2.0.0-rc.3",
"@tanstack/solid-query": "workspace:*",
"babel-preset-solid": "^2.0.0-rc.0",
"babel-preset-solid": "^2.0.0-rc.2",
"npm-run-all2": "^5.0.0",
"solid-js": "^2.0.0-rc.0",
"solid-js": "^2.0.0-rc.3",
"tsup-preset-solid": "^2.2.0"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/solid-query-persist-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
"@babel/preset-typescript": "^7.18.6",
"@solidjs/testing-library": "^0.8.10",
"@solidjs/vite-plugin": "^3.0.0-next.27",
"@solidjs/web": "^2.0.0-rc.0",
"@solidjs/web": "^2.0.0-rc.3",
"@tanstack/query-test-utils": "workspace:*",
"@tanstack/solid-query": "workspace:*",
"babel-preset-solid": "^2.0.0-rc.0",
"babel-preset-solid": "^2.0.0-rc.2",
"npm-run-all2": "^5.0.0",
"solid-js": "^2.0.0-rc.0",
"solid-js": "^2.0.0-rc.3",
"tsup-preset-solid": "^2.2.0"
},
"peerDependencies": {
Expand Down
Loading
Loading