Product
Hot Chocolate
Is your feature request related to a problem?
This is more of a suggestion for improvement than a feature request.
The Optional<T> type is an excellent way to express whether or not a value is intended to be set, even when that value might be null. In my opinion, it's a useful primitive that, unfortunately, is not available as a built-in type in .NET (because Nullable<T> is not the same thing).
This type is primarily used in mutation definitions. But what if your mutation contract is defined as a command in the application layer or implemented differently elsewhere? In that case, the corresponding layer must depend on HotChocolate.
I understand that the type is defined in the HotChocolate.Abstractions package. However, that's the same place where types such as StateKind, ModuleOption, GraphQLException, ExecutionResult are defined, to name just a few. I believe the Optional<T> type is a much more fundamental primitive, one that goes beyond the scope of GraphQL abstractions.
Even moving it to the HotChocolate.Primitives package still gives the impression that this simple yet powerful primitive remains unnecessarily coupled to a GraphQL framework.
The solution you'd like
It might be a bit presumptuous of me to expect it to move to a completely separate namespace. I'd like to hear your thoughts.
Product
Hot Chocolate
Is your feature request related to a problem?
This is more of a suggestion for improvement than a feature request.
The
Optional<T>type is an excellent way to express whether or not a value is intended to be set, even when that value might benull. In my opinion, it's a useful primitive that, unfortunately, is not available as a built-in type in .NET (becauseNullable<T>is not the same thing).This type is primarily used in mutation definitions. But what if your mutation contract is defined as a command in the application layer or implemented differently elsewhere? In that case, the corresponding layer must depend on
HotChocolate.I understand that the type is defined in the
HotChocolate.Abstractionspackage. However, that's the same place where types such asStateKind,ModuleOption,GraphQLException,ExecutionResultare defined, to name just a few. I believe theOptional<T>type is a much more fundamental primitive, one that goes beyond the scope of GraphQL abstractions.Even moving it to the
HotChocolate.Primitivespackage still gives the impression that this simple yet powerful primitive remains unnecessarily coupled to a GraphQL framework.The solution you'd like
It might be a bit presumptuous of me to expect it to move to a completely separate namespace. I'd like to hear your thoughts.