ChilliCream / ChilliCream/graphql-platform
Source Generator does not set MethodInfo or ParameterInfo
@michaelstaib is already working on this.
Since Jul 20, 2026.
- Dominant language
- C#
- Stars
- 5.8k
- Forks
- 810
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 98
Description
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
- 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 -
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.
- 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.
Or, just any other method to access all attributes applied to objects/fields/arguments/etc on the graph in something like the TypeInterceptor so that custom middleware and directives can be applied consistently.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.