ermadmi78 / kobby

Kobby is a codegen plugin of Kotlin DSL Client by GraphQL schema. The generated DSL supports execution of complex GraphQL queries, mutation and subscriptions in Kotlin with syntax similar to native GraphQL syntax.
Apache License 2.0
83 stars 4 forks source link

Ktor 2 support #24

Closed sschuberth closed 2 years ago

sschuberth commented 2 years ago

Hi, are there any plans to support Ktor 2 (which is now at version 2.1.0)?

ermadmi78 commented 2 years ago

Hi. I agree, it's time to release Kobby 2.0 version, with Ktor 2 support. Additionally, in version 2.0 it is necessary to raise the minimum requirements for the Kotlin version from 1.5 to 1.6. I'll try to do it in the fall. If you need Ktor 2 support as soon as possible, I would recommend turning off the default adapter generation and implementing the adapter interface manually:

plugins {
    kotlin("jvm") version "1.6.21"
    id("io.github.ermadmi78.kobby") version "1.5.1"
}

kobby {
    kotlin {
        adapter {
            ktor {
                simpleEnabled = false
                compositeEnabled = false
            }
        }
    }
}
ermadmi78 commented 2 years ago

See an example of a manually implemented Ktor 2 adapter here

ermadmi78 commented 2 years ago

Available since release 2.0.0-beta.01