Skip to content

Commit cb87286

Browse files
Updating custom scalar tests based on agreed discussion that custom scalars should show regardless of being used or not
1 parent 21ec4f6 commit cb87286

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ scalar RandomScalar
14401440
'''
14411441
}
14421442

1443-
def "omit unused custom scalars when unused - created by sdl string"(){
1443+
def "show unused custom scalars when unused - created by sdl string"(){
14441444
given:
14451445
def sdl = '''type Query {astring : String aInt : Int} "Some Scalar" scalar CustomScalar'''
14461446

@@ -1459,6 +1459,9 @@ scalar RandomScalar
14591459
aInt: Int
14601460
astring: String
14611461
}
1462+
1463+
"CustomScalar"
1464+
scalar CustomScalar
14621465
'''
14631466
}
14641467

@@ -1502,7 +1505,7 @@ scalar RandomScalar
15021505
'''
15031506
}
15041507

1505-
def "omit unused custom scalars when unused - created programmatically"(){
1508+
def "show unused custom scalars when unused - created programmatically"(){
15061509
given:
15071510
GraphQLScalarType myScalar = new GraphQLScalarType("Scalar", "about scalar", new Coercing() {
15081511
@Override
@@ -1534,6 +1537,8 @@ scalar RandomScalar
15341537
someType: Int
15351538
}
15361539
1540+
"about scalar"
1541+
scalar Scalar
15371542
'''
15381543
}
15391544

0 commit comments

Comments
 (0)