graphql-platform
graphql-platform copied to clipboard
EnumTypeExtension doesn't change name of enum value
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
I'm trying to change the schema name of an enum value using EnumTypeExtension
. The API is present, but the name of the enum value is not changed.
Steps to reproduce
public enum ExampleEnum
{
Value1
}
public class ExampleEnumExtensions : EnumTypeExtension
{
protected override void Configure(IEnumTypeDescriptor descriptor)
{
descriptor.Name(nameof(ExampleEnum));
descriptor.Value(ExampleEnum.Value1).Name("Test");
}
}
public class Query
{
public ExampleEnum GetEnumValue() => ExampleEnum.Value1;
}
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services
.AddGraphQLServer()
.AddTypeExtension<ExampleEnumExtensions>()
.AddQueryType<Query>();
}
}
Relevant log output
No response
Additional Context?
No response
Product
Hot Chocolate
Version
12.0.0-preview.30