Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

CHANGELOG.md

820 lines33.6 KB

@tanstack/solid-query

6.0.0-rc.6

Patch Changes

  • #12613 5e44698 - Require the stable Solid 2.0 release: the solid-js and @solidjs/web peer ranges are now ^2.0.0, and the packages build and test against @solidjs/vite-plugin 3.0.0.

  • #12034 6bab31b - fix: prevent cache notifications during a Solid transition landing from reading a query options memo that has no committed value.

6.0.0-rc.5

Patch Changes

  • #11751 8a13b15 - Move off Solid's internal sharedConfig onto its public hydration API. The hydrating-mount checks read isHydrating(), the server cache stream writes through getHydrationWriter() gated on isHydratable() (so <NoHydration> is still respected), and useQuery consumes its streamed entry with takeHydrationValue(). sharedConfig is internal in Solid 2.0 and absent from the published solid-js declarations, so the previous imports no longer type-check.

    These APIs ship in Solid 2.0.0-rc.13, so the solid-js / @solidjs/web peer floor is now >=2.0.0-rc.13.

  • #11543 cb63f07 - Follow Solid 2.0.0-rc.9. The packages build with @solidjs/babel-plugin (the Solid 2.0 compiler, matching the rc.9 runtime's delegated-event contract) and test under vite 8; the solid-js / @solidjs/web peer floor is 2.0.0-rc.9.

    useQuery's setup-time snapshots (the meta projection's seed, the mount counts) now read the cache directly instead of through the hook's version signal. Under hydration, priming writes that signal during setup, and a write made during the hydration pass is held: a computation in the pass that reads it β€” tracked or not β€” is served the pre-write value and replays when the pass ends. For the hook's own derived nodes that replay is the takeover; for the computation instantiating the component (a <Loading> boundary's children) it was a remount, re-creating the hydrated component as a client render and letting cache writes reach the DOM while the stream was still open.

6.0.0-rc.4

Patch Changes

  • #11449 fd3f1c9 - fix: finish server renders that read a disabled query. Reading .data from a useQuery with enabled: false and nothing cached stopped an SSR render from ever completing β€” no bytes at all, since the data node was handed a promise that can never settle. That parking is intended client behaviour (the reader suspends into the nearest <Loading> until an enable, refetch or cache write revives the compute), but on the server there is no later: the render has to finish, and nothing will enable the query or write the cache before it does. A disabled query with no data now commits its idle state on the server, which is the contract the scalar metadata channel already honoured and the state the client hydrates to. Client behaviour is unchanged.

  • #11517 09f2666 - The single-flight consumer applies X-Revalidate on responses that carried no slice for the query cache (no collector registered, a redirect leaving the app) instead of throwing on the missing payload β€” nothing is covered, so the declared scope is swept in full. The header's three states are three scopes: absent leaves the cache alone, an empty declaration (revalidate: []) sweeps nothing, and the reserved key * (revalidate: '*') invalidates every query the payload did not cover.

  • #11360 0e6ff54 - fix: stop a mounted observer from re-creating and refetching a removed query. The read layer bumps its per-hook version signal on every cache event for its hash, removed included, and the recompute that followed called queryCache.build(), which put the entry the caller had just deleted straight back. The resurrection was not passive: the rebuilt entry also re-pointed the still-live observer, whose mount-fetch policy then refetched and repopulated the key, so removeQueries() (and clear()) could not be made to stick while any hook observed the key. query() now reuses the entry it last read when the cache no longer holds that hash, and only builds when the hash is genuinely new, so a removal leaves the cache empty and fires no fetch, while the mounted reader holds its last value until options change or a real entry returns through setQueryData, a refetch or a later mount. This is the behavior of the other adapters, and of solid-query at 6.0.0-rc.0.

6.0.0-rc.3

Patch Changes

  • #11394 f41ac71 - Sweep X-Revalidate keys in the single-flight consumer. A mutation can declare its invalidation scope with Solid's reload/redirect revalidate option; the flight payload covers what the server recomputed, and whatever a declared key matches beyond it (parameterized instances only the client holds, queries no loader owns) is now invalidated client-side β€” active queries refetch in the background, inactive ones are marked stale. Keys match by queryKey prefix, mirroring Solid Router's consumption of the same header.

6.0.0-rc.2

Minor Changes

  • #11326 72f8185 - SSR lifecycle utilities: new dehydrateSettled awaits in-flight queries before dehydrating so streamed HTML carries settled data; QueryClientProvider tears the client down after server render disposal (cancelQueries + clear, preventing cross-request leaks) and dehydration now respects defaultOptions.dehydrate.shouldDehydrateQuery filtering.

  • #11326 72f8185 - Built-in single-flight consumer: QueryClientProvider now subscribes the query cache's slice of Solid's multi-source single-flight channel under the exported FLIGHT_DATA_SOURCE id ("sq"). Mutation responses carrying that slice β€” a DehydratedState produced by a server collector registered with registerFlightDataSource(FLIGHT_DATA_SOURCE, hook) β€” hydrate the provider's client before the mutation's promise resolves, so every mounted query on those keys updates with no follow-up refetches and no per-app wiring. Subscribing is inert when no server collector exists. Requires the @solidjs/web release following 2.0.0-rc.4 (the named-source single-flight protocol).

Patch Changes

  • #11325 209f9f5 - fix: scope useMutation's mutation-cache subscription to the flight. The hook subscribed at mount with a bare reactive client() read (tripping Solid's STRICT_READ_UNTRACKED dev diagnostic) and held the subscription for its whole life even though the listener only matters while a mutation is in flight. The subscription now starts in run against the same client the mutation is built on and ends at settle: nothing reactive is read at setup, the listener and the mutation can never sit on different clients, and idle hooks hold no cache subscription.

  • #11326 72f8185 - Require solid-js and @solidjs/web 2.0.0-rc.6+. rc.6 ships the named flight-data source API the single-flight consumer uses, plus the async settle fix the adapter depends on (rc.5's settle-walk regression breaks query hydration).

6.0.0-rc.1

Major Changes

  • #11308 c809e09 - 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.4 (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; isInitialLoading (deprecated alias of isLoading) is removed from query results. 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.0.0-rc.0

Patch Changes

  • #11173 7b04d61 - chore: upgrade to solid v2 rc and rename vite-plugin-solid to @solidjs/vite-plugin

6.0.0-beta.8

Patch Changes

  • #11168 67c8179 - chore: upgrade to solid v2 beta 33. @tanstack/solid-query now requires solid-js >= 2.0.0-beta.33 (peer range floor raised): the provider-owned hydration channel depends on beta.33's normalizeIterator buffered-replay conflation fix β€” on beta.32 and earlier, hydration that begins after multiple stream chunks have arrived silently drops later channel yields, leaving queries never primed and their components frozen.

  • #11168 67c8179 - fix: prime the query cache during hydration through a provider-owned dehydration channel, so SSR-fetched queries come up warm instead of refetching on mount. QueryClientProvider streams dehydrated cache entries (query-core dehydrate() shapes) as each query settles during SSR β€” entries ride the same flush as the content that awaited them β€” and applies them on the client via query-core hydrate() (newer-wins) as they arrive, attaching each hydrated component's observer as soon as its entry is primed. The vestigial per-observer-result hydrationData copy is no longer serialized.

6.0.0-beta.7

Patch Changes

6.0.0-beta.6

Patch Changes

6.0.0-beta.5

Patch Changes

6.0.0-beta.4

Patch Changes

  • chore: bump vite-plugin-solid next.5 (#10516)

6.0.0-beta.3

Patch Changes

  • chore: bumps solid v2 to beta.5 (#10392)

  • chore: bump vite-plugin-solid next.4 (#10392)

6.0.0-alpha.2

Patch Changes

  • refactor: solid 2 reactivity compliance (#10316)

6.0.0-alpha.1

Patch Changes

  • chore: bumps solid v2 to beta.4 (#10307)

6.0.0-alpha.0

Major Changes

5.107.1

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.107.1

5.107.0

Patch Changes

  • Updated dependencies [b6add89]:
    • @tanstack/query-core@5.107.0

5.106.1

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.106.1

5.106.0

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.106.0

5.105.3

Patch Changes

  • Updated dependencies [3f4de1b, 969e580]:
    • @tanstack/query-core@5.105.3

5.105.2

Patch Changes

5.105.1

Patch Changes

  • #11373 7ccba6e - fix({react,preact,angular,solid,vue}-query/infiniteQueryOptions): correct the overload selected for a possibly-undefined 'initialData'

  • #11595 b9f369a - fix(solid-query/{queryOptions,useQuery}): correct the overload selected for 'initialData'

  • #12390 18e54bf - Exclude fetchStatus from the filters accepted by QueryClient.isFetching, useIsFetching, and injectIsFetching. These APIs always count queries with fetchStatus: 'fetching'.

  • Updated dependencies [6f8a48d, 18e54bf]:

    • @tanstack/query-core@5.105.1

5.105.0

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.105.0

5.104.5

Patch Changes

  • Updated dependencies [f608f93]:
    • @tanstack/query-core@5.104.5

5.104.4

Patch Changes

  • #11251 fc3a384 - fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports

  • #11920 7ea0278 - fix(solid-query): subscribe to the new observer when the queryClient passed to useQuery changes

  • Updated dependencies [1fee044, fce89dd]:

    • @tanstack/query-core@5.104.4

5.104.3

Patch Changes

  • Updated dependencies [0f15bc9]:
    • @tanstack/query-core@5.104.3

5.104.2

Patch Changes

  • Updated dependencies [03e8c39]:
    • @tanstack/query-core@5.104.2

5.104.1

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.104.1

5.104.0

Patch Changes

  • Updated dependencies [5279b05]:
    • @tanstack/query-core@5.104.0

5.103.3

Patch Changes

  • #11628 6ebffac - fix: switch SSR cleanup property to address Astro crash
  • Updated dependencies []:
    • @tanstack/query-core@5.103.3

5.103.2

Patch Changes

  • Updated dependencies [8a28904]:
    • @tanstack/query-core@5.103.2

5.103.1

Patch Changes

  • Updated dependencies [8330b2f, 3212966]:
    • @tanstack/query-core@5.103.1

5.103.0

Patch Changes

5.102.8

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.102.8

5.102.7

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.102.7

5.102.6

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.102.6

5.102.5

Patch Changes

  • Updated dependencies [578e5c2]:
    • @tanstack/query-core@5.102.5

5.102.4

Patch Changes

  • Updated dependencies [a05df6a]:
    • @tanstack/query-core@5.102.4

5.102.3

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.102.3

5.102.2

Patch Changes

  • Updated dependencies [80fbf73]:
    • @tanstack/query-core@5.102.2

5.102.1

Patch Changes

  • Updated dependencies [134890d]:
    • @tanstack/query-core@5.102.1

5.102.0

Patch Changes

5.101.4

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.101.4

5.101.3

Patch Changes

  • Updated dependencies [7e3c822]:
    • @tanstack/query-core@5.101.3

5.101.2

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.101.2

5.101.1

Patch Changes

  • Updated dependencies [9eff92e]:
    • @tanstack/query-core@5.101.1

5.101.0

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.101.0

5.100.14

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.100.14

5.100.13

Patch Changes

  • Updated dependencies [d423168]:
    • @tanstack/query-core@5.100.13

5.100.12

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.100.12

5.100.11

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.100.11

5.100.10

Patch Changes

  • fix(query-devtools): remove experimentalDts to prevent solid-js type leak (#10694)

  • Updated dependencies []:

    • @tanstack/query-core@5.100.10

5.100.9

Patch Changes

  • Updated dependencies [fcee7bd]:
    • @tanstack/query-core@5.100.9

5.100.8

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.100.8

5.100.7

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.100.7

5.100.6

Patch Changes

  • refactor(solid-query): remove 'Solid' prefix from 'SolidQueryOptions', 'SolidInfiniteQueryOptions', and 'SolidMutationOptions' (#10500)

  • Updated dependencies []:

    • @tanstack/query-core@5.100.6

5.100.5

Patch Changes

  • Updated dependencies [a53ef97]:
    • @tanstack/query-core@5.100.5

5.100.4

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.100.4

5.100.3

Patch Changes

  • Updated dependencies [f85d825]:
    • @tanstack/query-core@5.100.3

5.100.2

Patch Changes

5.100.1

Patch Changes

  • Updated dependencies [1bb0d23]:
    • @tanstack/query-core@5.100.1

5.100.0

Patch Changes

  • Updated dependencies [6540a41]:
    • @tanstack/query-core@5.100.0

5.99.2

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.99.2

5.99.1

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.99.1

5.99.0

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.99.0

5.98.0

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.98.0

5.97.0

Patch Changes

  • Updated dependencies [2bfb12c]:
    • @tanstack/query-core@5.97.0

5.96.2

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.96.2

5.96.1

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.96.1

5.96.0

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.96.0

5.95.2

Patch Changes

  • Updated dependencies [cd5a35b]:
    • @tanstack/query-core@5.95.2

5.95.1

Patch Changes

  • Updated dependencies [1f1775c]:
    • @tanstack/query-core@5.95.1

5.95.0

Patch Changes

  • Updated dependencies []:
    • @tanstack/query-core@5.95.0

5.94.5

Patch Changes

  • fix(*): resolve issue about excluded build directory (#10312)

  • Updated dependencies [4b6536d]:

    • @tanstack/query-core@5.94.5

5.94.4

Patch Changes

  • chore: fixed version (#10064)

  • Updated dependencies [4c75210]:

    • @tanstack/query-core@5.94.4

5.91.4

Patch Changes

  • fix: stop node types from leaking into browser (#10302)

5.91.3

Patch Changes

  • fix(streamedQuery): maintain error state on reset refetch with initialData defined (#10287)

  • Updated dependencies [248975e]:

    • @tanstack/query-core@5.91.2

5.91.2

Patch Changes

  • fix(core): cancel paused initial fetch when last observer unsubscribes (#10291)

  • Updated dependencies [a89aab9]:

    • @tanstack/query-core@5.91.1

5.91.1

Patch Changes

  • Updated dependencies [6fa901b]:
    • @tanstack/query-core@5.91.0

5.91.0

Minor Changes

  • feat(solid-query): add 'mutationOptions' (#10138)

5.90.26

Patch Changes

  • fix(solid-router): should only have useQueryClient/useIsRestoring due to context read (#10262)

5.90.25

Patch Changes

  • fix: allow both create/use for solid (#10260)

5.90.24

Patch Changes

  • fix: forward generic parameters in deprecated type aliases (#10093)

5.90.23

Patch Changes

  • Updated dependencies [e7258c5]:
    • @tanstack/query-core@5.90.20

5.90.22

Patch Changes

  • Updated dependencies [53fc74e]:
    • @tanstack/query-core@5.90.19

5.90.21

Patch Changes

  • Updated dependencies [dea1614]:
    • @tanstack/query-core@5.90.18

5.90.20

Patch Changes

  • Updated dependencies [269351b]:
    • @tanstack/query-core@5.90.17

5.90.19

Patch Changes

  • Updated dependencies [7f47906]:
    • @tanstack/query-core@5.90.16

5.90.18

Patch Changes

  • Updated dependencies [fccef79]:
    • @tanstack/query-core@5.90.15

5.90.17

Patch Changes

  • Updated dependencies [d576092]:
    • @tanstack/query-core@5.90.14

5.90.16

Patch Changes

  • Updated dependencies [4a0a78a]:
    • @tanstack/query-core@5.90.13

5.90.15

Patch Changes

  • Updated dependencies [72d8ac5]:
    • @tanstack/query-core@5.90.12

5.90.14

Patch Changes

  • Updated dependencies [c01b150]:
    • @tanstack/query-core@5.90.11

5.90.13

Patch Changes

  • Updated dependencies [8e2e174, eb559a6]:
    • @tanstack/query-core@5.90.10

5.90.12

Patch Changes

  • Updated dependencies [08b211f]:
    • @tanstack/query-core@5.90.9

5.90.11

Patch Changes

  • Updated dependencies [c0ec9fe]:
    • @tanstack/query-core@5.90.8

5.90.10

Patch Changes

  • Updated dependencies [b4cd121]:
    • @tanstack/query-core@5.90.7

5.90.9

Patch Changes

  • Skip errors if returned data is undefined (#9841)

5.90.8

Patch Changes

  • Updated dependencies [1638c02]:
    • @tanstack/query-core@5.90.6

5.90.7

Patch Changes

  • fix(solid-query): enable experimental_prefetchInRender by default for… (#9822)

5.90.6

Patch Changes

  • Updated dependencies [e42ddfe]:
    • @tanstack/query-core@5.90.5

5.90.5

Patch Changes

  • Updated dependencies [20ef922]:
    • @tanstack/query-core@5.90.4

5.90.4

Patch Changes

  • Updated dependencies [4e1c433]:
    • @tanstack/query-core@5.90.3