You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(query-db-collection): align queryOptions interop types
* ci: apply automated fixes
* chore(changeset): add query options interop patch note
* fix(query-db-collection): require queryFn in interop typing
* refactor(query-db-collection): remove interop overloads, keep type widenings
The broader type widenings (queryFn return T | Promise<T>, enabled as
QueryObserverOptions['enabled'], TQueryData generics) are sufficient to
handle queryOptions(...) interop without dedicated interop overloads.
This removes TaggedQueryKey, QueryOptionsInteropConfig, and the two
interop-specific overloads, reducing type complexity while preserving
all 24 type tests passing. Existing tests are unchanged from main —
only new interop tests are added.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Updated changeset
* Updated docs
---------
Co-authored-by: hugiex <hieunguynex@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/collections/query-collection.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,38 @@ The `queryCollectionOptions` function accepts the following options:
64
64
-`staleTime`: How long data is considered fresh
65
65
-`meta`: Optional metadata that will be passed to the query function context
66
66
67
+
### Using with `queryOptions(...)`
68
+
69
+
If your app already uses TanStack Query's `queryOptions` helper (e.g. from `@tanstack/react-query`), you can spread those options into `queryCollectionOptions`. Note that `queryFn` must be explicitly provided since query collections require it both in types and at runtime:
0 commit comments