[Bug?]: Result type of combine works not as expected

未關閉
#7,522 12 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@wasaybuilds 已經在處理了。

開始於 2026年8月20日。

  • #10577 來自 @ousamabenyounes —— 已關閉,未合併
  • #11239 來自 @wasaybuilds —— 未關閉

評估

難度
4/5
預估耗時
3-5 天
新手友好度
28/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
typescript
領域
frontend

研究方向

從 issue 中的 TypeScript 重現開始,將 Solid Query 推斷出的組合結果與連結的 React useQueries combine 文件進行比較。確定組合資料欄位和狀態欄位的預期契約,然後根據該契約透過回歸檢查驗證所回報的結果型別。

由索引模型根據 Issue 內容生成。

描述

package: solid-query types
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
    return createQueries(() => {
      const list = ["test1", "test2"];
      return ({
        queries: list .map((key) => ({
          queryKey: ["key", key],
          queryFn: () => true,
        })),
        combine: (results) => ({
          data: results.every(result => result.data)
        })
      });
    });
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 and pending

How often does this bug happen?

Every time

Screenshots or Videos

image

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

主要語言
TypeScript
星號
50.6k
分支
4.2k
平均合併
9 小時 50 分鐘
30 天內合併 PR
310

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TanStack/query 的其他 Issue

查看 TanStack/query 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。