Closed
Description
In our application we have scalars such as Watts
and WattHours
where the back-end serializes the value to a JSON float. However, the Field
s that Graphqelm generates expect all scalars to be serialized as strings:
power : Field (Maybe Api.Scalar.Watts) Api.Object.SomeRecord
power =
Object.fieldDecoder "power" [] (Decode.string |> Decode.map Api.Scalar.Watts |> Decode.maybe)
This decoder causes the whole decode for this record to fail and return a Nothing
This is also problematic on the encoding side since the back-end will expect these values to be serialized as JSON floats there as well.
Metadata
Metadata
Assignees
Labels
No labels