Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 9a87afc

Browse files
committed
Merge branch 'release/8.1.1'
# Conflicts: # README.md # gradle.properties
2 parents 4f20e0c + 60816d0 commit 9a87afc

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- master
6+
- release/**
67

78
jobs:
89
validation:

graphql-kickstart-spring-support/src/main/java/graphql/kickstart/spring/error/ErrorHandlerSupplier.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package graphql.kickstart.spring.error;
22

33
import graphql.kickstart.execution.error.GraphQLErrorHandler;
4-
import java.util.Objects;
54
import java.util.function.Supplier;
65

76
public class ErrorHandlerSupplier implements Supplier<GraphQLErrorHandler> {
@@ -22,7 +21,7 @@ public boolean isPresent() {
2221
}
2322

2423
public void setErrorHandler(GraphQLErrorHandler errorHandler) {
25-
this.errorHandler = Objects.requireNonNull(errorHandler);
24+
this.errorHandler = errorHandler;
2625
}
2726

2827
}

graphql-spring-boot-autoconfigure/src/main/java/graphql/kickstart/spring/web/boot/GraphQLWebAutoConfiguration.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,13 @@ public class GraphQLWebAutoConfiguration {
104104
public static final String SUBSCRIPTION_EXECUTION_STRATEGY = "subscriptionExecutionStrategy";
105105

106106
private final GraphQLServletProperties graphQLServletProperties;
107+
private final ErrorHandlerSupplier errorHandlerSupplier = new ErrorHandlerSupplier(null);
107108

108109
@Bean
109110
public GraphQLErrorStartupListener graphQLErrorStartupListener(
110111
@Autowired(required = false) GraphQLErrorHandler errorHandler) {
111-
return new GraphQLErrorStartupListener(new ErrorHandlerSupplier(errorHandler),
112+
errorHandlerSupplier.setErrorHandler(errorHandler);
113+
return new GraphQLErrorStartupListener(errorHandlerSupplier,
112114
graphQLServletProperties.isExceptionHandlersEnabled());
113115
}
114116

@@ -257,13 +259,9 @@ public GraphQLInvoker graphQLInvoker(GraphQLBuilder graphQLBuilder,
257259
@ConditionalOnMissingBean
258260
public GraphQLObjectMapper graphQLObjectMapper(
259261
ObjectProvider<ObjectMapperProvider> objectMapperProviderObjectProvider,
260-
@Autowired(required = false) GraphQLServletObjectMapperConfigurer objectMapperConfigurer,
261-
@Autowired(required = false) GraphQLErrorHandler errorHandler) {
262+
@Autowired(required = false) GraphQLServletObjectMapperConfigurer objectMapperConfigurer) {
262263
GraphQLObjectMapper.Builder builder = newBuilder();
263-
264-
if (errorHandler != null) {
265-
builder.withGraphQLErrorHandler(new ErrorHandlerSupplier(errorHandler));
266-
}
264+
builder.withGraphQLErrorHandler(errorHandlerSupplier);
267265

268266
ObjectMapperProvider objectMapperProvider = objectMapperProviderObjectProvider.getIfAvailable();
269267

@@ -272,7 +270,6 @@ public GraphQLObjectMapper graphQLObjectMapper(
272270
} else if (objectMapperConfigurer != null) {
273271
builder.withObjectMapperConfigurer(objectMapperConfigurer);
274272
}
275-
log.info("Building GraphQLObjectMapper including errorHandler: {}", errorHandler);
276273
return builder.build();
277274
}
278275

lombok.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lombok.addLombokGeneratedAnnotation = true

0 commit comments

Comments
 (0)