Skip to content

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

Closed

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]
            }

Activity

  1. added 2 commits that reference this issue on May 18, 2020
    0070e2a
    fdee810
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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