graphql / graphql/graphql.github.io
`StarWarsSchema` type descriptions are `null` in Introspection docs
- Langage dominant
- TypeScript
- Étoiles
- 889
- Forks
- 1.5k
- Merge moyen
- 4 j 12 h
- PR mergées (30 j)
- 21
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez dans src/components/Marked/swapiSchema.tsx, en particulier avec les commentaires de description autour des lignes 112–113, et comparez-les avec l’exemple BlockString de la spécification GraphQL. Consultez la page de documentation Introspection pour reproduire les descriptions null. C’est terminé lorsque les descriptions de StarWarsSchema apparaissent dans les résultats d’introspection au lieu de null.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- documentation
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 55/100