@@ -46,6 +46,7 @@ import graphql.schema.idl.DirectiveBehavior
46
46
import graphql.schema.idl.RuntimeWiring
47
47
import graphql.schema.idl.ScalarInfo
48
48
import graphql.schema.idl.SchemaGeneratorHelper
49
+ import org.slf4j.LoggerFactory
49
50
import java.util.*
50
51
import kotlin.reflect.KClass
51
52
@@ -57,6 +58,7 @@ import kotlin.reflect.KClass
57
58
class SchemaParser internal constructor(scanResult : ScannedSchemaObjects , private val options : SchemaParserOptions , private val runtimeWiring : RuntimeWiring ) {
58
59
59
60
companion object {
61
+ val log = LoggerFactory .getLogger(SchemaClassScanner ::class .java)!!
60
62
const val DEFAULT_DEPRECATION_MESSAGE = " No longer supported"
61
63
62
64
@JvmStatic
@@ -201,7 +203,7 @@ class SchemaParser internal constructor(scanResult: ScannedSchemaObjects, privat
201
203
.name(inputDefinition.name)
202
204
.definition(inputDefinition)
203
205
.description(if (inputDefinition.description != null ) inputDefinition.description.content else getDocumentation(inputDefinition))
204
- .defaultValue(inputDefinition.defaultValue)
206
+ .defaultValue(buildDefaultValue( inputDefinition.defaultValue) )
205
207
.type(determineInputType(inputDefinition.type))
206
208
.withDirectives(* buildDirectives(inputDefinition.directives, setOf (), Introspection .DirectiveLocation .INPUT_FIELD_DEFINITION ))
207
209
builder.field(fieldBuilder.build())
@@ -226,6 +228,7 @@ class SchemaParser internal constructor(scanResult: ScannedSchemaObjects, privat
226
228
val enumName = enumDefinition.name
227
229
val enumValue = type.unwrap().enumConstants.find { (it as Enum <* >).name == enumName }
228
230
? : throw SchemaError (" Expected value for name '$enumName ' in enum '${type.unwrap().simpleName} ' but found none!" )
231
+
229
232
val enumValueDirectives = buildDirectives(enumDefinition.directives, setOf (), Introspection .DirectiveLocation .ENUM_VALUE )
230
233
getDeprecated(enumDefinition.directives).let {
231
234
val enumValueDefinition = GraphQLEnumValueDefinition .newEnumValueDefinition()
0 commit comments