Skip to content

Commit b7037d7

Browse files
committed
recursively instantiate beans in arguments
1 parent 9844973 commit b7037d7

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ else if (value != null && CollectionFactory.isApproximableCollectionType(value.g
8989
Class<?> elementType = typeDescriptor.getElementTypeDescriptor().getType();
9090
args[i] = instantiateCollection(elementType, (Collection<Object>) value);
9191
}
92-
else {
92+
else if (value instanceof Map) {
93+
args[i] = this.instantiate((Map<String, Object>) value, methodParam.getParameterType());
94+
} else {
9395
args[i] = this.converter.convertIfNecessary(value, paramTypes[i], methodParam);
9496
}
9597
}

0 commit comments

Comments
 (0)