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
Enums that start with an underscore seems to be problematic. For example,
public enum AccountType
{
_401k
}
I see it in the schema but not in the strawberryshake generated code and I get a build error.
What is expected?
I expect to see public enum AccountType { _401k } in the strawberry shake generated code
What is actually happening?
Exists in the schema
enum AccountType {
_401_K
}
Enum doesn't exist in in the strawberry shake generated code.
Also a build error occurs with this error.
Unhandled exception. System.AggregateException: One or more errors occurred. (The specified name is not a valid GraphQL name. (Parameter 'name'))
---> System.ArgumentException: The specified name is not a valid GraphQL name. (Parameter 'name')
at HotChocolate.Utilities.NameUtils.EnsureGraphQLName(String name, String argumentName) in /home/runner/work/graphql-platform/graphql-platform/src/HotChocolate/Core/src/Abstractions/Utilities/NameUtils.cs:line 38
at StrawberryShake.CodeGeneration.Analyzers.Models.EnumValueModel..ctor(String name, String description, IEnumValue value, String underlyingValue) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/Models/EnumValueModel.cs:line 18
at StrawberryShake.CodeGeneration.Analyzers.DocumentAnalyzer.CollectEnumTypes(IDocumentAnalyzerContext context) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/DocumentAnalyzer.CollectEnumTypes.cs:line 30
at StrawberryShake.CodeGeneration.Analyzers.DocumentAnalyzer.CreateOperationModel(IDocumentAnalyzerContext context) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/DocumentAnalyzer.CollectOutputTypes.cs:line 17
at StrawberryShake.CodeGeneration.Analyzers.DocumentAnalyzer.AnalyzeAsync() in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/DocumentAnalyzer.cs:line 55
at StrawberryShake.CodeGeneration.CSharp.CSharpGenerator.GenerateAsync(IEnumerable1 fileNames, CSharpGeneratorSettings settings) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGenerator.cs:line 133
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at StrawberryShake.Tools.GenerateCommand.GenerateCommandHandler.GenerateClient(String clientName, String[] documents, CSharpGeneratorSettings settings) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/Tooling/src/dotnet-graphql/GenerateCommand.cs:line 164
at StrawberryShake.Tools.GenerateCommand.GenerateCommandHandler.ExecuteAsync(GenerateCommandArguments args, CancellationToken cancellationToken) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/Tooling/src/dotnet-graphql/GenerateCommand.cs:line 124
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at StrawberryShake.Tools.Program.
(String[] args)
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Product
Strawberry Shake
Version
13.9.14
Link to minimal reproduction
none
Steps to reproduce
Enums that start with an underscore seems to be problematic. For example,
I see it in the schema but not in the strawberryshake generated code and I get a build error.
What is expected?
I expect to see
public enum AccountType { _401k }
in the strawberry shake generated codeWhat is actually happening?
Exists in the schema
Enum doesn't exist in in the strawberry shake generated code.
Also a build error occurs with this error.
Unhandled exception. System.AggregateException: One or more errors occurred. (The specified name is not a valid GraphQL name. (Parameter 'name'))
(String[] args)---> System.ArgumentException: The specified name is not a valid GraphQL name. (Parameter 'name')
at HotChocolate.Utilities.NameUtils.EnsureGraphQLName(String name, String argumentName) in /home/runner/work/graphql-platform/graphql-platform/src/HotChocolate/Core/src/Abstractions/Utilities/NameUtils.cs:line 38
at StrawberryShake.CodeGeneration.Analyzers.Models.EnumValueModel..ctor(String name, String description, IEnumValue value, String underlyingValue) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/Models/EnumValueModel.cs:line 18
at StrawberryShake.CodeGeneration.Analyzers.DocumentAnalyzer.CollectEnumTypes(IDocumentAnalyzerContext context) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/DocumentAnalyzer.CollectEnumTypes.cs:line 30
at StrawberryShake.CodeGeneration.Analyzers.DocumentAnalyzer.CreateOperationModel(IDocumentAnalyzerContext context) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/DocumentAnalyzer.CollectOutputTypes.cs:line 17
at StrawberryShake.CodeGeneration.Analyzers.DocumentAnalyzer.AnalyzeAsync() in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/DocumentAnalyzer.cs:line 55
at StrawberryShake.CodeGeneration.CSharp.CSharpGenerator.GenerateAsync(IEnumerable1 fileNames, CSharpGeneratorSettings settings) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGenerator.cs:line 133
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at StrawberryShake.Tools.GenerateCommand.GenerateCommandHandler.GenerateClient(String clientName, String[] documents, CSharpGeneratorSettings settings) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/Tooling/src/dotnet-graphql/GenerateCommand.cs:line 164
at StrawberryShake.Tools.GenerateCommand.GenerateCommandHandler.ExecuteAsync(GenerateCommandArguments args, CancellationToken cancellationToken) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/Tooling/src/dotnet-graphql/GenerateCommand.cs:line 124
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at StrawberryShake.Tools.Program.
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: