Product
Hot Chocolate
Is your feature request related to a problem?
Methods registered through the source generator do not have the MethodInfo or any ParameterInfo set on the ObjectFieldConfiguration or any of their ArgumentConfiguration. When then inspecting configurations in a TypeInterceptor, fields and arguments are missing information.
This information used to be available under HotChocolate 15, and it is available for fields and arguments not being registered through the source generator, leading to a discrepancy in handling between those two paths.
Sample Repo
I have a sample repository up here demonstrating the issue.
https://github.com/[leniency/HotChocolate16Collections](https://github.com/leniency/HotChocolate16Collections)
- CustomDirectiveInterceptor this is a sample interceptor that applies a testing attribute at various locations. The FIELD_DEFINITION and ARGUMENT_DEFINITION are where the issue arises -
Member and Parameter properties are null on the corresponding configuration objects.
Use Cases
Adding custom directives based on attributes. I use a TypeInterceptor to check for various attributes to apply custom directives. Not all of these can be modified to inherit from DescriptorAttribute.
- DataAnnotations - The various validation and display attributes (
StringLength, Range, etc...) can be applied as directives for client-side validation and kept in sync with server logic.
The solution you'd like
Add MemberInfo and ParameterInfo to the configuration objects in the source generator, allowing TypeInterceptors and any other consumers to have access to the original type information.
Product
Hot Chocolate
Is your feature request related to a problem?
Methods registered through the source generator do not have the
MethodInfoor anyParameterInfoset on theObjectFieldConfigurationor any of theirArgumentConfiguration. When then inspecting configurations in a TypeInterceptor, fields and arguments are missing information.This information used to be available under HotChocolate 15, and it is available for fields and arguments not being registered through the source generator, leading to a discrepancy in handling between those two paths.
Sample Repo
I have a sample repository up here demonstrating the issue.
https://github.com/[leniency/HotChocolate16Collections](https://github.com/leniency/HotChocolate16Collections)
MemberandParameterproperties are null on the corresponding configuration objects.Use Cases
Adding custom directives based on attributes. I use a TypeInterceptor to check for various attributes to apply custom directives. Not all of these can be modified to inherit from
DescriptorAttribute.StringLength,Range, etc...) can be applied as directives for client-side validation and kept in sync with server logic.The solution you'd like
Add
MemberInfoandParameterInfoto the configuration objects in the source generator, allowing TypeInterceptors and any other consumers to have access to the original type information.