Skip to content
Source
Sign inSign up
TanStack/query

refactor(query-core)!: move Suspense policy to adapters #12710

MergedTkDodomerged 6 commits intotkdodo/ref/adapter-throw-on-error fromrefs/pull/12710/headmerged by TkDodo View on GitHub

Showing 24 changed files with 17 additions and 5 deletions (loading 21).

x
0 of 24 viewed, 24 left
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.
4 additions and 4 deletionspackages/angular-query/src/types.tsModified
View file
@@ -27,7 +27,7 @@
​
/**
* The options accepted by `injectQuery`, with cache data projected through an optional `select`. Same as
- * {@link QueryObserverOptions} from `@tanstack/query-core`, minus `notifyOnChangeProps` and `suspense`. Angular owns result
+ * {@link QueryObserverOptions} from `@tanstack/query-core`, minus `notifyOnChangeProps`. Angular owns result
* notifications and exposes errors through signals.
* @template TQueryFnData - The type your `queryFn` resolves to.
* @template TError - The type of errors your `queryFn` may throw.
@@ -42,7 +42,7 @@
TQueryKey extends QueryKey = QueryKey,
> = OmitKeyof<
QueryObserverOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>,
- 'notifyOnChangeProps' | 'suspense'
+ 'notifyOnChangeProps'