Skip to content

Commit 017f8ac

Browse files
committed
Update schema generator test
1 parent b3c99aa commit 017f8ac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/groovy/graphql/schema/idl/SchemaGeneratorTest.groovy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,7 +1770,8 @@ class SchemaGeneratorTest extends Specification {
17701770
17711771
def appliedDirective = f1.getAppliedDirective("deprecated")
17721772
appliedDirective.name == "deprecated"
1773-
appliedDirective.getArgument("reason").type == GraphQLString
1773+
appliedDirective.getArgument("reason").type instanceof GraphQLNonNull
1774+
(appliedDirective.getArgument("reason").type as GraphQLNonNull).wrappedType == GraphQLString
17741775
printAst(appliedDirective.getArgument("reason").argumentValue.value as Node) == '"No longer supported"'
17751776
17761777
when:
@@ -1781,7 +1782,8 @@ class SchemaGeneratorTest extends Specification {
17811782
17821783
def appliedDirective2 = f2.getAppliedDirective("deprecated")
17831784
appliedDirective2.name == "deprecated"
1784-
appliedDirective2.getArgument("reason").type == GraphQLString
1785+
appliedDirective2.getArgument("reason").type instanceof GraphQLNonNull
1786+
(appliedDirective2.getArgument("reason").type as GraphQLNonNull).wrappedType == GraphQLString
17851787
printAst(appliedDirective2.getArgument("reason").argumentValue.value as Node) == '"Just because"'
17861788
def directive2 = f2.getDirective("deprecated")
17871789
printAst(directive2.getArgument("reason").argumentDefaultValue.value as Node) == '"No longer supported"'

0 commit comments

Comments
 (0)