Closed Leonti closed 6 years ago
Thanks: )
While GraphQL doesn't specify a serialization format (quote):
JSON is the preferred serialization format for GraphQL, though as noted above, GraphQL does not require a specific serialization format.
JSON seems to be the most common, and JSON/JS doesn't support 64 bit ints. That's why we don't have them ATM. If you have your own serialization format would it be possible to implement ToValue
for Int64
as an orphan instance? Genuine question, I can't remember whether we're exporting enough to allow that...
Hi! Didn't know that about JSON, thanks for the info! 👍
I will try to implement my own instance later and let you know if I was able to (not sure my Haskell knowledge is good enough) :)
At the moment I'll stick with Double Thanks!
Hi! I'm trying to create a handler where one of the fields is Int32:
type DatePrice = Object "DatePrice" '[] '[Field "price" Int32 , Field "timestamp" Int64]
It fails because there is no
Tovalue
instance forInt64
maxBound
for Int32 is2147483647
so I can't use it for a timestamp. Are there some limitations not allowing to haveInt64
instance? Should I useDouble
in this case?P.S. Great library, by the way, really enjoying using it :)