Is there an existing issue for this?
Describe the bug
In a Project with nullable reference types enabled and a GraphQL mutation endpoint like this:
public class Mutation {
public record WorkItem(string Id, string? Description);
public Task<Dictionary<string, WorkItem?>> DoWork(Dictionary<string, WorkItem?> workItems)
{
// Do Work ...
return Task.FromResult(workItems);
}
}
The generated GraphQL Schema looks like this:
type Mutation {
doWork(input: DoWorkInput!): DoWorkPayload!
}
input DoWorkInput {
workItems: [KeyValuePairOfStringAndWorkItemInput!]!
}
input KeyValuePairOfStringAndWorkItemInput {
key: String!
value: WorkItemInput!
}
input WorkItemInput {
id: String!
description: String
}
The value: WorkItemInput! in KeyValuePairOfStringAndWorkItemInput should be nullable as is defined in Dictionary<string, WorkItem?>, but it is non-nullable.
Steps to reproduce
Full Reproduction in Repository: https://github.com/TheKatze/HotChocolateNullableRepro
Product
Hot Chocolate
Version
12.14.0, 13.0.0-preview.66
Is there an existing issue for this?
Describe the bug
In a Project with nullable reference types enabled and a GraphQL mutation endpoint like this:
The generated GraphQL Schema looks like this:
The
value: WorkItemInput!inKeyValuePairOfStringAndWorkItemInputshould be nullable as is defined inDictionary<string, WorkItem?>, but it is non-nullable.Steps to reproduce
Full Reproduction in Repository: https://github.com/TheKatze/HotChocolateNullableRepro
Product
Hot Chocolate
Version
12.14.0, 13.0.0-preview.66