Closed
Description
extendSchema()
doesn't set GraphQLSchema.description
if the schema
definition is in the input GraphQLSchema
instead of the AST.
Example
Running this code:
import { buildSchema, extendSchema, parse } from "graphql";
const extendedSchema = extendSchema(
buildSchema(`
"A schema description"
schema {
query: Foo
}
type Foo {
foo: String
}
`),
parse(`scalar Bar`),
);
console.log(`AST description: ${extendedSchema.astNode?.description?.value}`);
console.log(`GraphQLSchema description: ${extendedSchema.description}`);
will print this:
AST description: A schema description
GraphQLSchema description: undefined
Metadata
Metadata
Assignees
Labels
No labels