Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kotlin 2.0.x support. problem with SchemaGeneratorHooks #2019

Open
cryptoki opened this issue Jul 22, 2024 · 0 comments
Open

kotlin 2.0.x support. problem with SchemaGeneratorHooks #2019

cryptoki opened this issue Jul 22, 2024 · 0 comments

Comments

@cryptoki
Copy link

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())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant