Replies: 5 comments
-
Hi @paulbakker @srinivasankavitha Can you possibly review the feature request and suggest if it's a good one to proceed with? |
Beta Was this translation helpful? Give feedback.
-
Hi @paulbakker @srinivasankavitha, Tagging you if are able to direct me to an acceptable solution for the feature request and your thoughts on any more use-cases for the same. I have added a sample PR for the feature: Netflix/dgs-codegen#766 Approach:
I'd be interested to hear if there are any adjustments or further suggestions for the feature request and the use-case. I'd be happy to work with you to improve on the PR for any edge cases and test cases if the general direction is acceptable. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi @krutikavk, sorry for the slow reply, we were pretty busy preparing for the 10.x release before the holidays. I had a look at your prototype and did some more experimentation. While I'm not convinced that proxies add much value over the I shared the example here: https://github.com/paulbakker/dgs-bytebuddy-sparseupdate. |
Beta Was this translation helpful? Give feedback.
-
Hi @paulbakker Thank you for your input, we are currently analyzing the solution suggested. |
Beta Was this translation helpful? Give feedback.
-
Hi @paulbakker Additionally, the existing implementation of the Based on our previous interactions, we think that input object interfaces would help us to implement this mechanism without major changes to DGS Codegen and no changes to DGS runtime. Please let us know your thoughts, appreciate your support and understanding. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Similar to interfaces generation for data classes, having interface generation enabled for input types can be useful to extend functionality for input classes as well.
Use-case Walkthrough
Example of a use-case for interface type: https://github.com/krutikavk/sparseupdate-poc/tree/dynamic-proxy-no-intermediate
This design employs use of dynamic proxy to extend the functionality of any generic input class to identify presence of input arguments from client from a single object.
Consider the below schema and a sample class design:
Design:
DGS Mutation can now use extended functionality
proxyObject.isFieldSet(String fieldName)
to identify if an input field is provided by the client. Instead of deducing the same information from 2 objects i.e. DGS data fetching environment and input argument, single proxy object holds persistent state for the mutation.IUpdateShowInput
for input typeHappy to discuss further.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions