-
-
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
[Bug?]: Result type of combine works not as expected #7522
Comments
can you please show a typescript playground? thanks |
closing until we get a typescript playground reproduction |
Sorry I must have overseen the comment. If you really need a playground I can provide one. |
Your wish shall be granted: https://codesandbox.io/p/github/BierDav/temp-tanstack-query-ssr-bug/combine-not-working
Please reopen this issue, if this would work it would really be an outstanding feature |
sorry, is this now a runtime issue (state.map is not a function) or a type level issue as you initially claimed with the screenshot showing "argument of type ... is not assignable to parameter of type ..." ? |
It is both, but i recommend to resolve the type issue first, maybe this resolves the other one too |
here is a typescript playground with the error. @lachlancollins can you take a look please? The same code works fine when using |
Did you mean to ping @ardeora ? |
yes, sorry 🙈 |
Describe the bug
I have already posted a question to the discord: https://discord.com/channels/719702312431386674/1003327027849474198/1247640278987309058
Unfortunately no one answered in the thread and in the meanwhile I'm pretty sure that this is an incorrect result type.
Steps to reproduce
Expected behavior
As already said in the discord thread. I expect to just return a combined data and all other fields like isPending, isError and so on should be automatically handled by tanstack query. And if this is not possible, because I think in react it doesn't do that, it should be possible to freely define this result, because when we look at the react documentation (https://tanstack.com/query/latest/docs/framework/react/reference/useQueries#combine) clearly only uses
data
andpending
How often does this bug happen?
Every time
Screenshots or Videos
Platform
OS: Windows
Browser: Chrome
Node: v21.7.3
Tanstack Query adapter
solid-query
TanStack Query version
5.40.0
TypeScript version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: