@@ -3,6 +3,7 @@ package graphql.kickstart.tools
33import graphql.kickstart.tools.resolver.FieldResolverError
44import graphql.language.SourceLocation
55import graphql.schema.GraphQLInterfaceType
6+ import graphql.schema.GraphQLObjectType
67import graphql.schema.GraphQLSchema
78import org.springframework.aop.framework.ProxyFactory
89import spock.lang.Specification
@@ -445,7 +446,8 @@ class SchemaParserSpec extends Specification {
445446 traits: [PoodleTrait]
446447 }
447448
448- type Query { test: [Poodle] }''' . stripIndent())
449+ type Query { test: [Poodle] }
450+ ''' . stripIndent())
449451 .resolvers(new GraphQLQueryResolver () {
450452 static abstract class Trait {
451453 String id;
@@ -476,12 +478,20 @@ class SchemaParserSpec extends Specification {
476478 })
477479 .build()
478480 .makeExecutableSchema()
479- GraphQLInterfaceType traitInterface = schema. getType(" MammalTrait" ) as GraphQLInterfaceType
481+ GraphQLInterfaceType traitInterface = schema. getType(" Trait" ) as GraphQLInterfaceType
482+ GraphQLInterfaceType animalInterface = schema. getType(" Animal" ) as GraphQLInterfaceType
483+ GraphQLInterfaceType mammalTraitInterface = schema. getType(" MammalTrait" ) as GraphQLInterfaceType
480484 GraphQLInterfaceType dogInterface = schema. getType(" Dog" ) as GraphQLInterfaceType
485+ GraphQLObjectType poodleObject = schema. getType(" Poodle" ) as GraphQLObjectType
486+ GraphQLObjectType poodleTraitObject = schema. getType(" PoodleTrait" ) as GraphQLObjectType
481487
482488 then :
483- ! traitInterface. interfaces. empty
484- ! dogInterface. interfaces. empty
489+ poodleObject. interfaces. containsAll([dogInterface, animalInterface])
490+ poodleTraitObject. interfaces. containsAll([mammalTraitInterface, traitInterface])
491+ dogInterface. interfaces. contains(animalInterface)
492+ mammalTraitInterface. interfaces. contains(traitInterface)
493+ traitInterface. interfaces. empty
494+ animalInterface. interfaces. empty
485495 }
486496
487497 enum EnumType {
0 commit comments