Skip to content

Validation allows extensions to redefine field defined in base type #1898

Description

@felipe-gdr

Describe the bug
GraphQL Java's validation allows an extension type to define a field that has already been defined in the base class, if the field has the same type and arguments in both places.

To Reproduce
In this example, the field name is defined in the base type Human and then defined again in the extension type. This should generate a validation error, but it doesn't.

            schema {
              query: Human
            }
            
            type Human {
                id: ID!
                name: String!
            }
            extend type Human {
                name: String!
                friends: [String]
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions