@@ -877,7 +877,7 @@ type Query {
877877 scalar Foo
878878 directive @myDirective(foo: Foo) on FIELD_DEFINITION
879879 type Query {
880- field : Foo @myDirective
880+ foo(foo: Foo) : Foo @myDirective
881881 }
882882""" )
883883
@@ -897,17 +897,21 @@ type Query {
897897 def newSchema = SchemaTransformer . transformSchema(schema, visitor)
898898 then :
899899
900- def fieldDef = newSchema. getObjectType(" Query" ). getFieldDefinition(" field " )
900+ def fieldDef = newSchema. getObjectType(" Query" ). getFieldDefinition(" foo " )
901901 def appliedDirective = fieldDef. getAppliedDirective(" myDirective" )
902- def oldDirective = fieldDef. getDirective(" myDirective" )
902+ def oldSkoolDirective = fieldDef. getDirective(" myDirective" )
903+ def argument = fieldDef. getArgument(" foo" )
904+ def directive = newSchema. getDirective(" myDirective" )
905+ def directiveArgument = directive. getArgument(" foo" )
903906
904907 (fieldDef. getType() as GraphQLScalarType ). getName() == " Bar"
905- (oldDirective. getArgument(" foo" ). getType() as GraphQLScalarType ). getName() == " Bar"
908+ (argument. getType() as GraphQLScalarType ). getName() == " Bar"
909+ (directiveArgument. getType() as GraphQLScalarType ). getName() == " Bar"
910+
911+ (oldSkoolDirective. getArgument(" foo" ). getType() as GraphQLScalarType ). getName() == " Bar"
906912 (appliedDirective. getArgument(" foo" ). getType() as GraphQLScalarType ). getName() == " Bar"
907913
908914 newSchema. getType(" Bar" ) instanceof GraphQLScalarType
909915 newSchema. getType(" Foo" ) == null
910-
911-
912916 }
913917}
0 commit comments