I just fell in love with Elixir and currently in the process of refactoring our API from hapijs into a phoenix/absinthe one.
I am using the excellent Decimal library to represent monetary values for business logic inside the API as floating-point arithmetic is imprecise.
Unfortunately Absinthe serializes the Decimal custom type as string instead of float. The angular front-end expect those decimal values to be Float as defined by the standard graphql types.
Refactoring the front-end to transform all those strings to javascript numbers would be quite an undertaking.
I am currently looking at how to implement this at the field resolver level but being pretty new to Elixir any suggestions on how to solve this would be appreciated.
Thanks in advance






















