Skip to content

Revisit how input arguments are initialized #122

Closed
@rstoyanchev

Description

@rstoyanchev

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.

Metadata

Metadata

Assignees

Labels

in: coreIssues related to config and core supporttype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions