ExpediaGroup/graphql-kotlin

kotlin 2.0.x support. problem with SchemaGeneratorHooks

Opened this issue · 0 comments

hi.

if I use graphql-kotlin 8.0.0-alpha.3 together with kotlin 2.0.0, then our custom SchemaGeneratorHooks is ignored. graphl-java is set to 22.1. We ignore few properties, hence we created a CustomSchemaGeneratorHooks and implemented the method isValidProperty which is returns false for the specific property. Up to kotlin 1.9.x. everything works well. I saw that you are upgrading to Kotlin version 1.9.x in the new graphql-kotlin 8.x.

what is your plan to support kotlin 2.0? what is your recommendation when dealing with kotlin 2.0.0?

thanks.

class CustomSchemaGeneratorHooks : SchemaGeneratorHooks {
..
  override fun isValidProperty(kClass: KClass<*>, property: KProperty<*>): Boolean {
...
  }
..
}

Config

    val schema = toSchema(
        config = SchemaGeneratorConfig(
            supportedPackages = listOf("de.  ..  .graphql"),
            hooks = CustomSchemaGeneratorHooks(),
        ),
..

at the creation / app startup I printed out the schema

    log.info("{}", schema.print())