Consider DataFetcherExceptionResolver in GraphQTest
Prior to this commit, `@GraphQlTest` slice tests would only consider JsonComponent, RuntimeWiringConfigurer, Converter and GenericConverter beans. But DataFetcherExceptionResolver, Instrumentation and GraphQlSourceBuilderCustomizer are used in setting up the GraphQL source. This commit ensures that the `GraphQlTypeExcludeFilter` considers those bean types. Closes gh-30078
This commit is contained in:
committed by
Brian Clozel
parent
087e853c5d
commit
4388910435
@@ -444,7 +444,7 @@ There are `GraphQlTester` variants and Spring Boot will auto-configure them depe
|
||||
|
||||
Spring Boot helps you to test your {spring-graphql-docs}#controllers[Spring GraphQL Controllers] with the `@GraphQlTest` annotation.
|
||||
`@GraphQlTest` auto-configures the Spring GraphQL infrastructure, without any transport nor server being involved.
|
||||
This limits scanned beans to `@Controller`, `RuntimeWiringConfigurer`, `JsonComponent`, `Converter` and `GenericConverter`.
|
||||
This limits scanned beans to `@Controller`, `RuntimeWiringConfigurer`, `JsonComponent`, `Converter`, `GenericConverter`, `DataFetcherExceptionResolver`, `Instrumentation` and `GraphQlSourceBuilderCustomizer`.
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@GraphQlTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user