graphql / graphql/graphql.github.io
`StarWarsSchema` type descriptions are `null` in Introspection docs
- Lingua principale
- TypeScript
- Stelle
- 889
- Fork
- 1.5k
- Merge medio
- 4g 12h
- PR unite (30g)
- 21
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.