Skip to content

Commit 37d04c6

Browse files
adinauerclaude
andcommitted
fix(spring): Support older Spring GraphQL options API
Use the erased Consumer signature in the batch loader registry wrapper so the code compiles with both Spring GraphQL 1.2/1.3 and 1.4. Let the Spring Boot 3 Gradle plugin follow the tested matrix version instead of pinning it separately. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 81e6e98 commit 37d04c6

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

gradle/libs.versions.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ retrofit = "2.9.0"
3232
slf4j = "1.7.30"
3333
springboot2 = "2.7.18"
3434
springboot3 = "3.5.0"
35-
springboot3Plugin = "3.5.0"
3635
springboot4 = "4.0.0"
3736
# Android
3837
targetSdk = "36"
@@ -62,7 +61,7 @@ detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.23.8" }
6261
jacoco-android = { id = "com.mxalbert.gradle.jacoco-android", version = "0.2.0" }
6362
kover = { id = "org.jetbrains.kotlinx.kover", version = "0.7.3" }
6463
vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version = "0.30.0" }
65-
springboot3 = { id = "org.springframework.boot", version.ref = "springboot3Plugin" }
64+
springboot3 = { id = "org.springframework.boot", version.ref = "springboot3" }
6665
springboot4 = { id = "org.springframework.boot", version.ref = "springboot4" }
6766
spring-dependency-management = { id = "io.spring.dependency-management", version = "1.1.7" }
6867
gretty = { id = "org.gretty", version = "4.0.0" }

sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/graphql/SentryBatchLoaderRegistry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public BatchLoaderRegistry.RegistrationSpec<K, V> withName(String name) {
7575
}
7676

7777
@Override
78-
public BatchLoaderRegistry.RegistrationSpec<K, V> withOptions(
79-
Consumer<DataLoaderOptions.Builder> optionsConsumer) {
78+
@SuppressWarnings({"rawtypes", "unchecked"})
79+
public BatchLoaderRegistry.RegistrationSpec<K, V> withOptions(Consumer optionsConsumer) {
8080
return delegate.withOptions(optionsConsumer);
8181
}
8282

0 commit comments

Comments
 (0)