Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTypesImplementInterfaces check fails for interfaces implementing interfaces #2072
Comments
Fix TypesImplementInterfaces.check() for interfaces implementing interface #2072
With v15.0 and the support for interfaces implementing interfaces it seems like the TypesImplementInterfaces fails in some scenarios. This line:
https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/schema/validation/TypesImplementInterfaces.java#L175
only works when one is of type
GraphQLObjectTypeand the other ofGraphQLInterfaceType. There can be cases where both are interfaces now.This leads to:
Caused by: graphql.schema.validation.InvalidSchemaException: invalid schema:
object type 'Dog' does not implement interface 'Animal' because field 'traits' is defined as '[MammalTrait]' type and not as '[Trait]' type