Skip to content

Commit b9dbaa6

Browse files
committed
recursively instantiate beans in arguments
1 parent ce4a0a4 commit b9dbaa6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-graphql/src/main/java/org/springframework/graphql/data/method/annotation/support/GraphQlArgumentInstantiator.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ else if (value != null && CollectionFactory.isApproximableCollectionType(value.g
8282
Class<?> elementType = typeDescriptor.getElementTypeDescriptor().getType();
8383
args[i] = instantiateCollection(elementType, (Collection<Object>) value);
8484
}
85-
else {
85+
else if (value instanceof Map) {
86+
args[i] = this.instantiate((Map<String, Object>) value, methodParam.getParameterType());
87+
} else {
8688
args[i] = this.converter.convertIfNecessary(value, paramTypes[i], methodParam);
8789
}
8890
}

0 commit comments

Comments
 (0)