If a directive POCO has an Option<_>-wrapped list property, such as string array option, it fails with this error:
The directive arguments have invalid values: 'The list runtime value of [String!] must implement IEnumerable or IList but is of the type Microsoft.FSharp.Core.FSharpOption`1[[System.String[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].' at /my/optionOfArrayOfString. (.Nullability.MyDirectiveDescriptor)
A similar error was solved for object fields by adding a formatter that unwraps option values. However, this does not seem to be possible for directive arguments. The only formatter I can find for DirectiveArgumentDefinition is the Formatters property. I tried to add a suitable IInputValueFormatter to that collection, but it's never called.
@michaelstaib, do you have any ideas on how I can work around this issue?
If a directive POCO has an
Option<_>
-wrapped list property, such asstring array option
, it fails with this error:A similar error was solved for object fields by adding a formatter that unwraps option values. However, this does not seem to be possible for directive arguments. The only formatter I can find for
DirectiveArgumentDefinition
is theFormatters
property. I tried to add a suitableIInputValueFormatter
to that collection, but it's never called.@michaelstaib, do you have any ideas on how I can work around this issue?