File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/test/groovy/graphql/schema/idl Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -2247,6 +2247,25 @@ type Query {
22472247type TestObjectB {
22482248 field: String
22492249}
2250+ '''
2251+ }
2252+
2253+ def " deprecated defaultValue on programmatic args prints as expected" () {
2254+ def queryObjType = newObject(). name(" Query" )
2255+ .field(newFieldDefinition(). name(" f" ). type(GraphQLString )
2256+ .argument(newArgument(). name(" arg" ). type(GraphQLString ). defaultValue(null )))
2257+ .build()
2258+ def schema = GraphQLSchema . newSchema(). query(queryObjType). build()
2259+
2260+
2261+ when :
2262+ def options = defaultOptions(). includeDirectiveDefinitions(false )
2263+ def sdl = new SchemaPrinter (options). print (schema)
2264+ then :
2265+ sdl == '''
2266+ type Query {
2267+ f(arg: String = null): String
2268+ }
22502269'''
22512270 }
22522271}
You can’t perform that action at this time.
0 commit comments