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

Abierto Apto para principiantes
#2,139 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
graphql, typescript
Área
api, backend

Línea de trabajo

Empieza en flash.resolver.ts, donde FlashResolver.flash() ya no devuelve guid, y compáralo con el Flash.guid no nulable declarado en flash.model.ts. Revisa cómo vars { flashGuid } obtiene emhttp.var.flashGuid. Está terminado cuando flash { guid } devuelve el GUID de arranque, o cuando el campo se vuelve nulable para servidores que no tienen uno, y la consulta ya no anula toda la respuesta. Decide primero entre las dos soluciones, ya que el issue deja esto abierto.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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 }.

Lenguaje dominante
TypeScript
Estrellas
123
Forks
25
Merge medio
2 d 16 h
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de unraid/api

Todos los issues de unraid/api

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.