Closed
Description
Currently, @Argument
initialization is done by encoding the Map or List obtained from DataFetchingEnvironment
to JSON and then decoding the JSON to the target object. This is problematic due to the possibility to use of custom Scalars which aren't taken into account during the encoding and decoding, not to mention also inefficient.
We need to consider a way to apply the Map or List of values directly onto the target Object, i.e. without any encoding to and from JSON, similar to or perhaps even using DataBinder
to do this. Given that the values obtained from DataFetchingEnvironment
have had custom scalars deserialized already, then simply applying the values to properties of the target object should be all that's needed.