-
-
Notifications
You must be signed in to change notification settings - Fork 797
Description
Product
Hot Chocolate
Version
15.1.4
Link to minimal reproduction
https://github.com/thomastvedt/HotChocolateDictionaryBugReproduction
Steps to reproduce
- Add a mutation that returns
Task
- Start GraphQL API
- Generate schema
What is expected?
In version 15.1.3 HC generated a valid GraphQL schema for this mutation:
[UseMutationConvention]
public async Task DeleteMachineImage(
Guid machineId,
IMachineService machineService,
IResolverContext context
)
{
var machine = await machineService.GetMachine(machineId);
await machineService.DeleteImage(machineId);
}
I would expect this to still produce a valid GraphQL schema?
What is actually happening?
It generates types for Task, which has a AggregateException -> etc. and results in invalid schema. I included an example of the generated GraphQL schema in the readme here:
https://github.com/thomastvedt/HotChocolateDictionaryBugReproduction/blob/main/README.md
Relevant log output
Additional context
Discussion in slack:
https://hotchocolategraphql.slack.com/archives/CD9TNKT8T/p1748379850706879