We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Library Version 8.2.1
Describe the bug using graphQLPostRoute() gives java.lang.NoClassDefFoundError: io/ktor/server/routing/RoutingKt
To Reproduce
[versions] kotlin-version = "2.1.0" ktor-version = "3.0.3" logback-version = "1.4.14" graphql-version= "8.2.1" [libraries] ktor-server-core = { module = "io.ktor:ktor-server-core-jvm", version.ref = "ktor-version" } ktor-server-host-common = { module = "io.ktor:ktor-server-host-common-jvm", version.ref = "ktor-version" } ktor-server-status-pages = { module = "io.ktor:ktor-server-status-pages-jvm", version.ref = "ktor-version" } ktor-server-content-negotiation = { module = "io.ktor:ktor-server-content-negotiation-jvm", version.ref = "ktor-version" } ktor-serialization-jackson = { module = "io.ktor:ktor-serialization-jackson-jvm", version.ref = "ktor-version" } ktor-server-netty = { module = "io.ktor:ktor-server-netty-jvm", version.ref = "ktor-version" } logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback-version" } ktor-server-config-yaml = { module = "io.ktor:ktor-server-config-yaml-jvm", version.ref = "ktor-version" } ktor-server-test-host = { module = "io.ktor:ktor-server-test-host-jvm", version.ref = "ktor-version" } kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin-version" } graphql-kotlin-ktor={module="com.expediagroup:graphql-kotlin-ktor-server", version.ref = "graphql-version"} ktor-server-websockets = { module = "io.ktor:ktor-server-websockets-jvm", version.ref = "ktor-version" } [plugins] kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-version" } ktor = { id = "io.ktor.plugin", version.ref = "ktor-version" } graphql= {id="com.expediagroup.graphql", version.ref = "graphql-version"}
My build.gradle is as follows :
plugins { alias(libs.plugins.kotlin.jvm) alias(libs.plugins.ktor) alias(libs.plugins.graphql) } group = "com.example" version = "0.0.1" application { mainClass.set("io.ktor.server.netty.EngineMain") val isDevelopment: Boolean = project.ext.has("development") applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment") } repositories { mavenCentral() } dependencies { implementation(libs.ktor.server.core) implementation(libs.ktor.server.host.common) implementation(libs.ktor.server.status.pages) implementation(libs.ktor.server.content.negotiation) implementation(libs.ktor.serialization.jackson) implementation(libs.ktor.server.websockets) implementation(libs.ktor.server.netty) implementation(libs.logback.classic) implementation(libs.ktor.server.config.yaml) implementation(libs.graphql.kotlin.ktor) testImplementation(libs.ktor.server.test.host) testImplementation(libs.kotlin.test.junit) }
My application.kt is as follows :
package com.example import com.expediagroup.graphql.server.ktor.GraphQL import com.expediagroup.graphql.server.ktor.defaultGraphQLStatusPages import com.expediagroup.graphql.server.ktor.graphQLPostRoute import com.expediagroup.graphql.server.operations.Query import io.ktor.server.application.* import io.ktor.server.plugins.statuspages.StatusPages import io.ktor.server.routing.Routing import io.ktor.server.routing.routing fun main(args: Array<String>) { io.ktor.server.netty.EngineMain.main(args) } class HelloWorldQuery : Query { fun hello(): String = "Hello World!" } fun Application.module() { install(GraphQL) { schema { packages = listOf("com.example") queries = listOf( HelloWorldQuery() ) } } routing{ graphQLPostRoute() } install(StatusPages) { defaultGraphQLStatusPages() } }
Expected behavior The /graphql route should be created
Actual Behaviour I get an exception on the console
The same code works fine with ktor version 2.x.x
The text was updated successfully, but these errors were encountered:
ktor-sample859.zip Minimum Reproducible Code sample attached
Sorry, something went wrong.
No branches or pull requests
Library Version
8.2.1
Describe the bug
using graphQLPostRoute() gives java.lang.NoClassDefFoundError: io/ktor/server/routing/RoutingKt
To Reproduce
My build.gradle is as follows :
My application.kt is as follows :
Expected behavior
The /graphql route should be created
Actual Behaviour
I get an exception on the console
The same code works fine with ktor version 2.x.x
The text was updated successfully, but these errors were encountered: