ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
4.96k stars 722 forks source link

AddMutationConventions throws exception if a mutation has an enum with a default value in its signature #7072

Open SvdSinner opened 3 weeks ago

SvdSinner commented 3 weeks ago

Product

Hot Chocolate

Version

14.0.0-p.35

Link to minimal reproduction

https://github.com/SvdSinner/StrawberryShakeIssueReproduction/tree/NotCompatibleCurrentLocation

Steps to reproduce

  1. Build code and see that it works by using BannanaCakePop
  2. Uncomment line 10 of HotChocolatePOC\Program.cs to enable .AddMutationConventions()
  3. Build code and see through BannanaCakePop that the schema can no longer be downloaded due to 500 server errors.
  4. Remove the default value of the severity argument on line 37 of HotChocolatePOC\LoggingMutation.cs
  5. Rebuild code and see through BannanaCakePop that the schema can now be downloaded normally and 500 server errors are no longer happening.

What is expected?

Enum parameters should be able to have default values while using .AddMutationConventions()

What is actually happening?

Enum parameters with default parameters cause exceptions leading to 500 server errors when used with .AddMutationConventions()

Relevant log output

No response

Additional context

This is possibly related to issue 7040