Hi fellows Im using kgraphql and I have the following structure on my models:
Copy code
data class A (
val id: String,
val b: B
)
enum class B{
AA, BB, CC
}
Trying to run the app I have the following error:
Exception in thread "main" com.apurebase.kgraphql.schema.SchemaException: Cannot handle enum class class com.example.B as Object type
. Does someone know how to solve it?
d
Dariusz Kuc
12/12/2022, 6:49 PM
have you tried asking this in #kgraphql?
e
Elizeu Silva dos Santos
12/14/2022, 8:22 AM
I didn’t know about this, thank ill ask it there
a
Andres
01/11/2023, 6:53 PM
I had the same problem and I fixed it by doing...
Copy code
fun SchemaBuilder.someSchema() {
enum<B>()
mutation("someMutationThatUsesEnum") {
...
Andres
01/11/2023, 6:54 PM
It's funny I found this slack channel based on that search and was sad I couldn't find the answer so I am sharing here incase it helps someone in the future.