Skip to content

Commit d546069

Browse files
committed
Upgrade to Spring for GraphQL 1.4.0-SNAPSHOT
See gh-45029
1 parent 4cbf931 commit d546069

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/observation/graphql/GraphQlObservationAutoConfiguration.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@
3030
import org.springframework.context.annotation.Bean;
3131
import org.springframework.graphql.execution.GraphQlSource;
3232
import org.springframework.graphql.observation.DataFetcherObservationConvention;
33+
import org.springframework.graphql.observation.DataLoaderObservationConvention;
3334
import org.springframework.graphql.observation.ExecutionRequestObservationConvention;
3435
import org.springframework.graphql.observation.GraphQlObservationInstrumentation;
3536

@@ -49,9 +50,10 @@ public class GraphQlObservationAutoConfiguration {
4950
@ConditionalOnMissingBean
5051
public GraphQlObservationInstrumentation graphQlObservationInstrumentation(ObservationRegistry observationRegistry,
5152
ObjectProvider<ExecutionRequestObservationConvention> executionConvention,
52-
ObjectProvider<DataFetcherObservationConvention> dataFetcherConvention) {
53+
ObjectProvider<DataFetcherObservationConvention> dataFetcherConvention,
54+
ObjectProvider<DataLoaderObservationConvention> dataLoaderObservationConvention) {
5355
return new GraphQlObservationInstrumentation(observationRegistry, executionConvention.getIfAvailable(),
54-
dataFetcherConvention.getIfAvailable());
56+
dataFetcherConvention.getIfAvailable(), dataLoaderObservationConvention.getIfAvailable());
5557
}
5658

5759
}

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/graphql/GraphQlObservationAutoConfigurationTests.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@
2525
import org.springframework.context.annotation.Bean;
2626
import org.springframework.context.annotation.Configuration;
2727
import org.springframework.graphql.observation.DefaultDataFetcherObservationConvention;
28+
import org.springframework.graphql.observation.DefaultDataLoaderObservationConvention;
2829
import org.springframework.graphql.observation.DefaultExecutionRequestObservationConvention;
2930
import org.springframework.graphql.observation.GraphQlObservationInstrumentation;
3031
import org.springframework.graphql.server.WebGraphQlHandler;
@@ -71,6 +72,8 @@ void instrumentationUsesCustomConventionsIfAvailable() {
7172
.isInstanceOf(CustomExecutionRequestObservationConvention.class);
7273
assertThat(instrumentation).extracting("dataFetcherObservationConvention")
7374
.isInstanceOf(CustomDataFetcherObservationConvention.class);
75+
assertThat(instrumentation).extracting("dataLoaderObservationConvention")
76+
.isInstanceOf(CustomDataLoaderObservationConvention.class);
7477
});
7578
}
7679

@@ -97,6 +100,11 @@ CustomDataFetcherObservationConvention customDataFetcherConvention() {
97100
return new CustomDataFetcherObservationConvention();
98101
}
99102

103+
@Bean
104+
CustomDataLoaderObservationConvention customDataLoaderConvention() {
105+
return new CustomDataLoaderObservationConvention();
106+
}
107+
100108
}
101109

102110
static class CustomExecutionRequestObservationConvention extends DefaultExecutionRequestObservationConvention {
@@ -107,6 +115,10 @@ static class CustomDataFetcherObservationConvention extends DefaultDataFetcherOb
107115

108116
}
109117

118+
static class CustomDataLoaderObservationConvention extends DefaultDataLoaderObservationConvention {
119+
120+
}
121+
110122
@Configuration(proxyBeanMethods = false)
111123
static class WebGraphQlConfiguration {
112124

Diff for: spring-boot-project/spring-boot-dependencies/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,7 @@ bom {
22272227
releaseNotes("https://github.com/spring-projects/spring-framework/releases/tag/v{version}")
22282228
}
22292229
}
2230-
library("Spring GraphQL", "1.4.0-M1") {
2230+
library("Spring GraphQL", "1.4.0-SNAPSHOT") {
22312231
considerSnapshots()
22322232
group("org.springframework.graphql") {
22332233
modules = [

0 commit comments

Comments
 (0)