Skip to content

Extending an Object Type in Code #1569

Closed
@ldiego08

Description

@ldiego08

(Posting here since haven't been able to get an answer from any other of channels. 😅)

So, using SDL you can add fields to an existing type like:

extend type Query {
   extraField: Int!
}

But how can I do this in code using the built-in classes (GraphQLObjectType, etc)?

Sounds like extendSchema might offer a way, but it is undocumented and I'm not sure how to use it in this case.

Is this supported?

My apologies in advance if I'm missing something really obvious.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions