-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[vue-query]: queryOptions unassignable type #6299
Copy link
Copy link
Closed
Labels
Description
Describe the bug
I tried using queryOptions as the documentation says, to use the same parameters in the useQuery and the queryClient.fetchQuery. When I use the queryOptions in the useQuery, everything looks fine, but when I try to use it in the fetchQuery, an error "Argument of type <...> is not assignable to parameter of type <...>" occurs.
Your minimal, reproducible example
Steps to reproduce
- Go to reproducible example link
- See the error in the last line
Expected behavior
I was expecting to be able to use shareable parameters in both the useQuery composable and the fetchQuery function, but I can't because of a TypeScript error
How often does this bug happen?
Every time
Screenshots or Videos
Platform
Windows 11, Node v21.1.0, Nuxt 3
Tanstack Query adapter
vue-query
TanStack Query version
v5.4.3
TypeScript version
v5.2.2
Additional context
No response
Reactions are currently unavailable
