Steps to reproduce the bug:
- Clone this repo
- Run
npm install
- Run
node printSchema.js
to print the schema using thegraphql
package'sprintSchema()
function, which should produce output like the following:
$ node printSchema.js
type Book {
"""
multiline
Book.dummy
description
"""
dummy: String
}
"""
multiline
Query
description
"""
type Query {
books: [Book]
}
- Run
node server.js
to start the localApolloServer
- Run
npx -p @apollo/[email protected] rover graph introspect http://localhost:4000
to print the schema using the Rover CLI, which should produce output like the following:
$ npx -p @apollo/[email protected] rover graph introspect http://localhost:4000
Introspection Response:
"""Exposes a URL that specifies the behaviour of this scalar."""
directive @specifiedBy on SCALAR
type Book {
"""
multiline
Book.dummy
description
"""
dummy: String
}
"""
multiline
Query
description
"""
type Query {
books: [Book]
}
Note that the inconsistent leading whitespace is the multiline comment on the Book.dummy
field.