File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
src/main/kotlin/graphql/kickstart/tools Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -196,18 +196,16 @@ class SchemaParser internal constructor(
196196 ? : throw SchemaError (" Expected value for name '$enumName ' in enum '${type.unwrap().simpleName} ' but found none!" )
197197
198198 val enumValueAppliedDirectives = buildAppliedDirectives(enumDefinition.directives)
199- getDeprecated(enumDefinition.directives).let {
200- val enumValueDefinition = GraphQLEnumValueDefinition .newEnumValueDefinition()
201- .name(enumName)
202- .description(getDocumentation(enumDefinition, options))
203- .value(enumValue)
204- .deprecationReason(it)
205- .withAppliedDirectives(* enumValueAppliedDirectives)
206- .definition(enumDefinition)
207- .build()
208-
209- builder.value(enumValueDefinition)
210- }
199+ val enumValueDefinition = GraphQLEnumValueDefinition .newEnumValueDefinition()
200+ .name(enumName)
201+ .description(getDocumentation(enumDefinition, options))
202+ .value(enumValue)
203+ .apply { getDeprecated(enumDefinition.directives)?.let { deprecationReason(it) } }
204+ .withAppliedDirectives(* enumValueAppliedDirectives)
205+ .definition(enumDefinition)
206+ .build()
207+
208+ builder.value(enumValueDefinition)
211209 }
212210
213211 return directiveWiringHelper.wireEnum(builder.build())
You can’t perform that action at this time.
0 commit comments