Skip to content
Source
Sign inSign up
TanStack/query

refactor(query-core)!: move error boundary options to adapters #12709

DraftTkDodowants to merge 8 commits intoquery-v6 fromrefs/pull/12709/headopened View on GitHub

Showing 74 changed files with 26 additions and 5 deletions (loading 71).

x
0 of 74 viewed, 74 left
16 additions and 0 deletions.changeset/adapter-error-boundary-options.mdAdded
View file
@@ -0,0 +1,16 @@
+---
+'@tanstack/angular-query': major
+'@tanstack/lit-query': major
+'@tanstack/preact-query': major
+'@tanstack/query-core': major
+'@tanstack/react-query': major
+'@tanstack/solid-query': major
+'@tanstack/svelte-query': major
+'@tanstack/vue-query': major
+---
+​
+Move error boundary options out of query-core. React, Preact, Solid, and Vue still accept `throwOnError` in their adapter options and client defaults. Import `QueryClient` from the adapter to configure those defaults. Imperative refetch methods still accept `throwOnError` to control promise rejection.
+​
+Query observers now notify listeners when the result's error changes, even when the component does not track `error`. Set `notifyOnChangeProps: 'none'` to suppress all notifications and opt out of the query's `throwOnError` boundary handling.
+​
+In React and Preact, `useQueries` skips `combine` when a query error needs to reach the error boundary.
10 additions and 0 deletions.changeset/adapter-suspense-policy.mdAdded
View file
@@ -0,0 +1,10 @@
+---
+'@tanstack/query-core': major
+'@tanstack/react-query': major
+'@tanstack/preact-query': major
+'@tanstack/lit-query': major
+'@tanstack/svelte-query': major
+'@tanstack/vue-query': major
+---
+​
+Remove the `suspense` observer option from query-core. React and Preact select Suspense behavior through their dedicated hooks.