Fork me on GitHub
#graphql
<
2018-01-30
>
gklijs14:01:56

I’m not, just got to using lacinia for a workshop thursday, consuming from kafka, and keeping an internal atom as db, working well, and easy to set up. I was a bit disappointed to find out long isn’t a supported type for graphql.

hlship17:01:27

It's very easy to add, to the point where I'm thinking of putting the scaffolding directly into Lacinia. But it is odd, isn't it? The joy of working with other people's specs.

hiredman17:01:09

longs and json don't mix well

hiredman18:01:21

the other day a coworker of mine ran in to an issue where he would type certain large numbers in to his clojure repl, and clojure would print back at him different large numbers, and it turned out the reason was his editor was encoding the repl response as json some time between it being returned from eval and displayed to him, and the number was outside of the range that is exactly representable as a double

sashton18:01:05

which editor was being used?

hiredman18:01:54

I am not entirely sure, I think it was atom with proto repl

gklijs18:01:58

I don’t really see what’s wrong with them with avro from kafka its represented well enough

{"iban":"NL66OPEN0000000000","new_balance":9223372036750120822,"changed_by":-249766,"from_to":"NL63OPEN0958452689","description":"salary 2018-01-30T19:17:25.542+01:00","balance_id":37}

timgilbert18:01:45

It's easy enough to do with a scalar transformer, but kind of a pain needing to stringify all your numbers on the query-generation side

hiredman18:01:14

it isn't so much of a question of if longs can be encoded as json, but if that json is going to be parsed in javascript at point

gklijs18:01:08

ok, since it are currencies, and it’s just a workshop, I now store them formatted, and return them as strings.

hlship21:01:24

0.24.0 and 0.6.0 are up on Clojars