Skip to content

Extend the extend functionality #1095

Closed
@kbrandwijk

Description

@kbrandwijk

Currently, it's only possible to extend object types by spec. However, when using schema stitching, I'm running into use case where it would be nice to be able to extend other parts of my schema, like unions, interfaces, enums and input types.

I would like to be able to use the same syntax as for object types. For interfaces, enums and input types, I don't see any issues with that. For unions, the syntax is a bit different, so I'm open to suggestions for how that might look. As an alternative, the use case for unions might also be dealt with when merging schemas. If you agree with that, I will open an issue on graphql-tools for that. But for interfaces, enums, and input types, I think the change should be on the graphql-js side.

Examples:

extend enum MyEnum {
  NewValue
}

extend interface MyInterface {
  NewField: String
}

extend input MyInput {
  NewField: String
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions