Skip to content

Type extension information gets lost when a schema is parsed and printed #2386

Closed
@pmantica1

Description

@pmantica1

I noticed that type extension information gets lost when a schema is printed and parsed. Essentially, I noticed the following issue:

const graphql = require("graphql");
schema = "type Object {a : Int} extend type Object {b: Int}"
console.log(graphql.printSchema(graphql.buildASTSchema(graphql.parse(schema))));
// type Object {a: int} 

This seems like a bug to me though I am not 100% what the expected behavior is. Please let me know what you think.

(Please pardon my poor javascript since I am primarily a python developer. I noticed the issue originally in the python port of the GraphQL library and backtracked it here).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions