-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
queryOptions typing errors when calling queryClient methods with ref in query key #7101
Comments
sandbox is private, I cannot access it |
if you have a typing issue, please just provide a typescript playground, that's so much easier: |
Apologies, I did not realise the sandbox was set to private by default, I have made it public. I did not provide a TypeScript playground link because I was struggling to replicate the issue there. However now that I understand it better I can also provide a link to that too: |
@DamianOsipiuk FYI |
agree, face the same problem :( |
Thank you for the fix @DamianOsipiuk! This allows us to adopt the much better |
Describe the bug
Follow on from #6299. It appears the typing issues persist if your queryKey includes any Ref or MaybeRef values, both nested in objects and at the top level.
Your minimal, reproducible example
https://codesandbox.io/p/devbox/tanstack-query-example-vue-basic-forked-3gchjt?file=%2Fsrc%2FPosts.vue%3A12%2C37
Steps to reproduce
Expected behavior
There should be no typing errors, as we have ensured the query options object is valid by passing it through the queryOptions function.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Tanstack Query adapter
vue-query
TanStack Query version
v5.27.5
TypeScript version
v5.1.6
Additional context
No response
The text was updated successfully, but these errors were encountered: