-
Notifications
You must be signed in to change notification settings - Fork 359
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
Spring server not bootstrapping correctly when following instructions in documentation/examples #1679
Comments
Hello, graphql-playground is now in deprecation process and is disabled by default, this change was introduced in and if you want to keep using playground you will have to explicitly enable it like this graphql:
playground:
enabled: true graphql playground was deprecated in favor of graphiql, which is the official IDE under graphql foundation and is available in the You can refer to the prerelease docs the documentation you are providing actually mentions it
|
Hi, Is |
and just to add: graphql:
playground:
enabled: true does not work in the repro either |
ok, i took a closer look at your repro repo, and there are a couple of things wrong:
if you want to use spring boot 3, you can try the 7.x.x alpha releases. |
plugins {
id("org.springframework.boot") version "2.7.2"
kotlin("jvm") version "1.6.21"
kotlin("plugin.spring") version "1.6.21"
}
group = "com.example"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("com.expediagroup:graphql-kotlin-spring-server:6.3.6")
implementation("com.graphql-java:graphql-java:19.2")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
|
Ah, I see. I can indeed get it to work with spring boot 3 and java 17 by using pre-relase version This dependency configuration works fine import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "3.0.2"
id("io.spring.dependency-management") version "1.1.0"
kotlin("jvm") version "1.7.22"
kotlin("plugin.spring") version "1.7.22"
}
group = "com.example"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_17
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-ebflux")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("com.expediagroup:graphql-kotlin-spring-server:7.0.0-alpha.3")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
}
}
tasks.withType<Test> {
useJUnitPlatform()
} |
Library Version
Describe the bug
When setting up a spring server, by referring to the docs and examples below, the server does not bootstrap correctly. Navigating to
http://localhost:8080/graphiql
(or any other url) results in a 404. However, when downgrading dependencies (java version, spring, graphql-kotlin-spring-server) to match what is used in this article, it works.To Reproduce
Please refer to this reproduction repository. The main branch contains the non-working example, and there is a PR to the main branch demonstrating the working example with downgraded dependencies.
Expected behavior
The server should bootstrap correctly and serve the graphiql user interface at
localhost:8080/graphiql
Edit: updated endpoint from
/playground
to/graphiql
The text was updated successfully, but these errors were encountered: