Custom Input deserialization #699
lukas-krecan
started this conversation in
Ideas
Replies: 3 comments
-
It seems that Custom IDs can be implemented by custom scalar parser that is registers on the ID type. I did not know it's possible to override the default Scalar |
Beta Was this translation helpful? Give feedback.
0 replies
-
For the nullable use-case we can get the value from DgsDataFetchingEnvironment.arguments |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the post and your findings. I was not aware of this set up
either, so that's really useful to know it's available. I would also be
interested in looking at your code when you have it set up so we can
document that for future reference.
…On Tue, Oct 19, 2021 at 2:46 AM Lukáš Křečan ***@***.***> wrote:
For the nullable use-case we can get the value from
DgsDataFetchingEnvironment.arguments
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#699 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ5JPXJXS5SZDJFIUQOYHPTUHU477ANCNFSM5GIUT4WQ>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am looking for a way how to customize input deserialization. I have 2 use cases
ShowId
andActorId
. Currently we can not use them in Input objects as there is no way how to do it. (We can not use custom scalars as we are using Relay node query so the IDs have to be of the same type in the schema). We can use custom primary constructor for that, but it's polluting the classes.I have checked the source code and all the relevant methods are private and members of a final class so there is basically no way for us to customize it. I am basically some ability to change the behavior of
DataFetcherInvoker.convertValue
Beta Was this translation helpful? Give feedback.
All reactions