flash { guid } always fails: resolver no longer returns guid but the schema marks it non-nullable
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- graphql, typescript
调研方向
从 flash.resolver.ts 开始,查看 FlashResolver.flash() 不再返回 guid 的地方,并与 flash.model.ts 中声明的非空 Flash.guid 进行比较。检查 vars { flashGuid } 如何获取 emhttp.var.flashGuid。完成的标准是:flash { guid } 返回启动 GUID,或者将该字段改为可空以适配没有 GUID 的服务器,并且查询不再将整个响应置为空。由于 issue 对此未作定论,请先在两种修复方案之间做出决定。
由索引模型根据 Issue 内容生成。
描述
Environment
Unraid OS Version: 7.3.4 (API 4.37.9+bedd403a)
Are you using a reverse proxy? No. Tested directly against the server's built-in /graphql endpoint, authenticated with an x-api-key (ADMIN role).
Hardware / setup that may matter: Supermicro X12STH-F, Xeon E-2356G. Boots from a USB flash drive with a Pro licence registered to it (not internal boot, not TPM licensing). vars { flashGuid } returns the correct GUID on this server, so the value is available to the API.
Pre-submission Checklist
- I have verified that my Unraid OS is up to date
- I have tested this issue by accessing my server directly (not through a reverse proxy)
- This is not an Unraid Connect related issue (if it is, please submit via the support form instead)
Issue Description
Any flash query that asks for guid fails, because the resolver never returns it and the schema says it can never be null.
Flash.guid is declared as String! in flash.model.ts, but FlashResolver.flash() returns only id, vendor and product. guid: emhttp.var.flashGuid was removed from the resolver in #1361 (commit 586653cc, 2025-04-29) and the field was never removed from the model. It is still like this on main.
Steps to Reproduce
query { flash { id vendor product } }succeeds.query { flash { guid } }fails.
Expected Behavior
guid returns the boot device GUID (the same value as vars { flashGuid }), or the field is nullable or removed if it is meant to go away for internal boot / TPM servers.
Actual Behavior
{"errors":[{"message":"Cannot return null for non-nullable field Flash.guid.","path":["flash","guid"]}],"data":null}
Because flash itself is non-nullable on Query, the error also wipes out every other field in the same request: { online flash { guid } } returns "data": null.
Additional Context
Possible fixes: put back guid: emhttp.var.flashGuid in flash.resolver.ts, or make the field nullable: true if internal boot servers have no flash GUID (see #1880). The workaround for now is vars { flashGuid }.
- 主要语言
- TypeScript
- 星标
- 123
- 派生
- 25
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
unraid/api 的其他 Issue
-
Temperature metrics: lm-sensors voltages, fan speeds and power are reported as temperatures (°C)未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
yavorsky/unbuilt.app#65 ·
-
CVE security
难度 2/5 1-3 小时 新手友好度 68/100
mckinsey/agents-at-scale-ark#4091 · 1 条评论 ·
维护者通常 1 天内回复
-
factory:subtask
难度 1/5 1 小时以内 新手友好度 94/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
NUS-Project-SaBai/project-sabai#386 ·
维护者通常 3 天内回复
-
android needs clarification
难度 2/5 1-3 小时 新手友好度 72/100
super-productivity/super-productivity#12105 · 3 条评论 ·
维护者通常 1 天内回复