cmeeren / FSharp.HotChocolate

Support for F# types and nullability in HotChocolate
MIT License
7 stars 1 forks source link

Fix async fields not getting options unwrapped #11

Closed cmeeren closed 2 months ago

cmeeren commented 2 months ago

For Task<_> fields, the formatter to unwrap options is not applied because the type is not purely Option<_> or IEnumerable<_>.

If I naïvely use the inner type (defaulting to the original type if not async) when building the formatter, the Task<_> problem is fixed, but Async<_> fields stop working. It seems that the middleware that converts Async to Task is run after the formatter.

cmeeren commented 2 months ago

Fixed in fecc0ddebc9a5edd68a3fd7f3bc0b5b5c6132dda.