https://kotlinlang.org logo
#graphql-kotlin
Title
# graphql-kotlin
l

Lenny

05/13/2020, 10:24 PM
ack, nevermind … i can’t read. i needed to do this:
Copy code
override fun willGenerateGraphQLType(type: KType): GraphQLType? {
    return when (type.classifier as? KClass<*>) {
      // note the ::class.java
      CurrencyCodeProtos.CurrencyCode::class.java -> currencyCodeEnum
      else -> super.willGenerateGraphQLType(type)
    }
  }
s

Shane Myrick

05/13/2020, 10:42 PM
Great, glad you solved your issues. Do need to update the docs where you were reading to make it more clear?
l

Lenny

05/13/2020, 10:46 PM
it might be helpful to have an example for generated enums, since all the current examples are for scalars
i’m happy to make a PR!
s

Shane Myrick

05/13/2020, 10:54 PM
Sounds good! We would be happy to merge any additional examples or docs