You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not long ago a feature was introduced for supporting enums with [Flags] attribute. #5186
Currently there is no way to rename this auto generated type. Example:
[Flags]publicenumMyEnum{A
B
C
}publicclassMyEnumType:EnumType<MyEnum>{protectedoverrideConfigure(IEnumTypeDescriptor<MyEnum>descriptor){descriptor.Name("MyRenamedEnum");}}
Will generate the following:
enumMyRenamedEnum {
A B C
}
typeMyEnumFlags {
isA: Boolean!isB: Boolean!isC: Boolean!
}
Notice that MyEnumFlags is used rather than MyRenamedEnumFlags.
The solution you'd like
Flags enums are supported through TypeInterceptors and not a specific type. As I'm not familiar with these, I'm unsure the best way to support this.
Another solution would be to support respecting the original EnumType. The trick here is determining whether the developer
wants the flags type, or actually wants to use the enum type despite flags being enabled.
Product
Hot Chocolate
Is your feature request related to a problem?
Not long ago a feature was introduced for supporting enums with
[Flags]
attribute.#5186
Currently there is no way to rename this auto generated type. Example:
Will generate the following:
Notice that
MyEnumFlags
is used rather thanMyRenamedEnumFlags
.The solution you'd like
Flags enums are supported through TypeInterceptors and not a specific type. As I'm not familiar with these, I'm unsure the best way to support this.
Ideas:
Another solution would be to support respecting the original EnumType. The trick here is determining whether the developer
wants the flags type, or actually wants to use the enum type despite flags being enabled.
The text was updated successfully, but these errors were encountered: