graphql-platform
graphql-platform copied to clipboard
F# option-wrapped values are only nullable if inner type is a reference type
Product
Hot Chocolate
Version
13.8.1
Link to minimal reproduction
See zip below
Steps to reproduce
Repro: HotChocolateRepro.zip
Code for quick reference (using HotChocolate.Types.FSharp with .AddFSharpTypeConverters():
type Foo = {
A: string option
B: int option
}
type Query() =
member _.GetStuff(a: string option, b: int option) =
{ A = a; B = b }
What is expected?
This schema definition:
type Query {
stuff(a: String, b: Int): Foo
}
type Foo {
a: String
b: Int
}
What is actually happening?
This schema definition:
type Query {
stuff(a: String, b: Int!): Foo
}
type Foo {
a: String
b: Int!
}
Relevant log output
No response
Additional context
No response
Can you open a PR with a snapshot test? Once the PR is there. I can help fix it.
Sure, can you point me in the right direction? Is there a test I can copy, and where should I place the new test?
Hi, just a reminder that I'm happy to contribute. Could you point me in the right direction? Is there a test I can copy, and where should I place the new test?