Skip to content

Type extension not in the AST #1701

@mitchellsimoens

Description

@mitchellsimoens

If I have the follow schema:

type Query {
  version: String!
  name: String!
}

extend type Query {
  hello: String!
}

When I try to build an AST it doesn't contain the hello field. Debugging and I get into the buildASTSchema I do see the field in the documentAST.definitions[1].fields array but within the for loop of buildASTSchema I see it never handles the ObjectTypeExtension kind. I do see #922 talking about something similar but I don't see why the extensions cannot be properly merged together in the result even if the fields aren't all merged together and it just has an extensions key in the type.

For a full example (along with the IntrospectionQuery I'm using): https://gist.github.com/mitchellsimoens/eaa0579b07772aabf8d9c876cd2cd6d2

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