Skip to content
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

Open
reillylm opened this issue Jul 17, 2023 · 0 comments
Open

StarWarsSchema type descriptions are null in Introspection docs #1496

reillylm opened this issue Jul 17, 2023 · 0 comments

Comments

@reillylm
Copy link

We're currently specifying descriptions in the StarWarsSchema using comments:

# An autonomous mechanical character in the Star Wars universe
type Droid implements Character {

...which is causing them to resolve as null when we run introspection queries, like in this example on the Introspection docs page:

introspectionDocs1

The newer versions of the spec 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:

introspectionDocs2

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.

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant