Skip to content

Revisit how input arguments are initialized #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rstoyanchev opened this issue Sep 1, 2021 · 0 comments
Closed

Revisit how input arguments are initialized #122

rstoyanchev opened this issue Sep 1, 2021 · 0 comments
Assignees
Labels
in: core Issues related to config and core support type: bug A general bug
Milestone

Comments

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Sep 1, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues related to config and core support type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants