diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java index 6b19ade6a1..bc90f07e5c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java @@ -50,6 +50,7 @@ import org.springframework.graphql.execution.DefaultBatchLoaderRegistry; import org.springframework.graphql.execution.DefaultExecutionGraphQlService; import org.springframework.graphql.execution.GraphQlSource; import org.springframework.graphql.execution.RuntimeWiringConfigurer; +import org.springframework.graphql.execution.SubscriptionExceptionResolver; /** * {@link EnableAutoConfiguration Auto-configuration} for creating a Spring GraphQL base @@ -76,6 +77,7 @@ public class GraphQlAutoConfiguration { @ConditionalOnMissingBean public GraphQlSource graphQlSource(ResourcePatternResolver resourcePatternResolver, GraphQlProperties properties, ObjectProvider exceptionResolvers, + ObjectProvider subscriptionExceptionResolvers, ObjectProvider instrumentations, ObjectProvider wiringConfigurers, ObjectProvider sourceCustomizers) { String[] schemaLocations = properties.getSchema().getLocations(); @@ -83,6 +85,7 @@ public class GraphQlAutoConfiguration { properties.getSchema().getFileExtensions()); GraphQlSource.SchemaResourceBuilder builder = GraphQlSource.schemaResourceBuilder() .schemaResources(schemaResources).exceptionResolvers(toList(exceptionResolvers)) + .subscriptionExceptionResolvers(toList(subscriptionExceptionResolvers)) .instrumentation(toList(instrumentations)); if (!properties.getSchema().getIntrospection().isEnabled()) { builder.configureRuntimeWiring(this::enableIntrospection);