-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StarWarsSchema
type descriptions are null
in Introspection docs
#1496
Comments
reillylm
added a commit
to reillylm/graphql.github.io
that referenced
this issue
Jul 17, 2023
We're currently specifying descriptions in the `StarWarsSchema` using comments, which is causing them to resolve as `null` when we run introspection queries, like in the [last example on the Introspection docs page](https://graphql.org/learn/introspection/). The [newer versions of the spec](https://spec.graphql.org/October2021/#sec-Descriptions) outline that descriptions should use a `BlockString`, so this change updates all the descriptions to use `BlockString` instead of comments. Looks like, alternatively, we could have specified `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. Fixes graphql#1496
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We're currently specifying descriptions in the
StarWarsSchema
using comments:graphql.github.io/src/components/Marked/swapiSchema.tsx
Lines 112 to 113 in 51db38b
...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 outline that descriptions should use a
BlockString
like this:Here's with a
BlockString
description forDroid
instead:Looks like, alternatively, we could specify
commentDescriptions
in our invocation ofmakeExecutableSchema
, 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.
The text was updated successfully, but these errors were encountered: