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
Since update to 3.1.0 version (previous was 13.0.2)
Description
There is class, that union Mutation and Subscription resolver interfaces
@Component
public class UserAttributeMutation implements GraphQLMutationResolver, GraphQLSubscriptionResolver {
Expected behavior
FieldResolverScanner can find all methods
Actual behavior
FieldResolverScanner resolves only subscription method
Steps to reproduce the bug
It happens because there in following method
private fun getAllMethods(search: Search): List<Method> {
val type = search.type.unwrap()
val declaredMethods = type.declaredNonProxyMethods
val superClassesMethods = ClassUtils.getAllSuperclasses(type).flatMap { it.methods.toList() }
val interfacesMethods = ClassUtils.getAllInterfaces(type).flatMap { it.methods.toList() }
return (declaredMethods + superClassesMethods + interfacesMethods)
.asSequence()
.filter { !it.isSynthetic }
.filter { !Modifier.isPrivate(it.modifiers) }
// discard any methods that are coming off the root of the class hierarchy
// to avoid issues with duplicate method declarations
.filter { it.declaringClass != Object::class.java }
// subscription resolvers must return a publisher
.filter { search.source !is GraphQLSubscriptionResolver || resolverMethodReturnsPublisher(it) }
.toList()
}
was added new filter
.filter { search.source !is GraphQLSubscriptionResolver || resolverMethodReturnsPublisher(it) }
So, all methods, that not return Publisher are ignored
The text was updated successfully, but these errors were encountered:
Since update to 3.1.0 version (previous was 13.0.2)
Description
There is class, that union Mutation and Subscription resolver interfaces
Expected behavior
FieldResolverScanner can find all methods
Actual behavior
FieldResolverScanner resolves only subscription method
Steps to reproduce the bug
It happens because there in following method
was added new filter
.filter { search.source !is GraphQLSubscriptionResolver || resolverMethodReturnsPublisher(it) }
So, all methods, that not return Publisher are ignored
The text was updated successfully, but these errors were encountered: