Open mjarosie opened 3 years ago
As it turns out it's just the AutoField
which doesn't work for ID
:
Define.Field("id", ID, (fun _ person -> person.Id )) // Works
Define.AutoField("id", ID) // Doesn't work as shown above
I think FSharp.Data.GraphQL.Types.Guid
should be used here
@mjarosie try with the latest package from GitHub feed. If not fixed I'll take care
Description
When using built-in ID GraphQL type to represent the Guid .NET type I'm getting
Object must implement IConvertible
error back from the executor.Repro steps
Expected behavior
I'm getting a list of people
ID
s back.Actual behavior
I'm receiving the following error:
Known workarounds
You can change the Type definition of the
Guid
field to be just aString
, but semantically that's not correct (I'm still getting my head around GraphQL, but as far as I know that's the whole purpose of using ID type - it is not intended to be human‐readable):