flash { guid } always fails: resolver no longer returns guid but the schema marks it non-nullable

オープン 初心者向け
#2,139 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
graphql, typescript
領域
api, backend

調査の方向性

flash.resolver.ts から始めて、FlashResolver.flash() が guid を返さなくなった箇所を確認し、flash.model.ts で宣言されている非 nullable の Flash.guid と比較してください。vars { flashGuid } が emhttp.var.flashGuid をどのように取得しているかも確認します。flash { guid } がブートGUIDを返すようになった時点、または GUID を持たないサーバー向けにフィールドを nullable にし、クエリがレスポンス全体を null にしなくなった時点で完了です。Issue では方針が未決定のため、まず2つの修正案のどちらにするかを決めてください。

索引モデルが 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

  1. query { flash { id vendor product } } succeeds.
  2. 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時間
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

unraid/api のほかの issue

unraid/api の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。