graphql / graphql/graphql.github.io
`StarWarsSchema` type descriptions are `null` in Introspection docs
- Lenguaje dominante
- TypeScript
- Estrellas
- 889
- Forks
- 1.5k
- Merge medio
- 4 d 12 h
- PR fusionados (30 d)
- 21
Descripción
We're currently specifying descriptions in the `StarWarsSchema` using comments:
https://github.com/graphql/graphql.github.io/blob/51db38b9c3c32b7c0cb50640853ecace27aabc68/src/components/Marked/swapiSchema.tsx#L112-L113
...which is causing them to resolve as `null` when we run introspection queries, like in this example on the Introspection docs page:
>
The [newer versions of the spec](https://spec.graphql.org/October2021/#sec-Descriptions) outline that descriptions should use a `BlockString` like this:
```
"""
An autonomous mechanical character in the Star Wars universe
"""
type Droid implements Character {}
```
Here's with a `BlockString` description for `Droid` instead:
>
Looks like, alternatively, we could specify `commentDescriptions` in our invocation of `makeExecutableSchema`, but we might as well make our schema consistent with the current way of specifying descriptions in the spec.
I can open a PR for this change if it sounds good.
Guía de contribución
Línea de trabajo
Empieza en src/components/Marked/swapiSchema.tsx, especialmente con los comentarios de descripción alrededor de las líneas 112–113, y compáralos con el ejemplo de BlockString de la especificación de GraphQL. Consulta la página de documentación de Introspection para reproducir las descripciones null. Está hecho cuando las descripciones de StarWarsSchema aparecen en los resultados de introspection en lugar de null.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- documentation
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 55/100