Skip to content

@Argument doesn't support Map as a target type at any level #449

Closed
@bduisenov

Description

@bduisenov

I'm currently facing an issue when JSON scalar is not converted into a Map correctly.

To my understanding, the issue is with DataBinder that tries to convert the value. In case when the target type is a Map interface, it will fail on a line spring-graphql-1.0.1-sources.jar!/org/springframework/graphql/data/GraphQlArgumentBinder.java:248 with error saying that it cannot find constructor. And when switching to a concrete implementation like HashMap, an empty map will be a result of conversion because of BeanPropertyBindingResult.

I'm not sure whether this is an expected behaviour to be honest, but I assume that this is a bug as the conversion works in case when target type is List<Map<.., ..>>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions