You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
As mentioned in #219 there is a problem with the scan mechanism of GraphQLErrorHandlerFactory. In #create(...):33ff all bean names that pass the applicationContext::containsBean check are scanned for exception handlers. The Javadoc of the method #containsBean(...) suggests that only singleton beans are returned. On the contrary, there is a hint that a true of this method does not mean that #getBean() will work for that bean. Unfortunately, exactly this is done in the scanning function #scanForExceptionHandlers(...):41, in order to get the class of the bean.
In my case, this tried to load a request scoped bean defined in a @Configuration via @Bean annotated method with @Scope(value = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS) and the whole creation of the factory dies.
Instead of using Class<?> objClz = context.getBean(name).getClass() in line 41 of GraphQLErrorHandlerFactory it would be much better to use Class<?> objClz = context.getType(name).
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
As mentioned in #219 there is a problem with the scan mechanism of
GraphQLErrorHandlerFactory
. In#create(...):33ff
all bean names that pass theapplicationContext::containsBean
check are scanned for exception handlers. The Javadoc of the method#containsBean(...)
suggests that only singleton beans are returned. On the contrary, there is a hint that atrue
of this method does not mean that#getBean()
will work for that bean. Unfortunately, exactly this is done in the scanning function#scanForExceptionHandlers(...):41
, in order to get the class of the bean.In my case, this tried to load a request scoped bean defined in a
@Configuration
via@Bean
annotated method with@Scope(value = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS)
and the whole creation of the factory dies.Instead of using
Class<?> objClz = context.getBean(name).getClass()
in line 41 ofGraphQLErrorHandlerFactory
it would be much better to useClass<?> objClz = context.getType(name)
.The text was updated successfully, but these errors were encountered: