Fork me on GitHub
#graphql
<
2021-03-23
>
finchharold07:03:09

How to declare timestamp data in the schema.edn?

gklijs07:03:33

There is an example here for using a custom scalar Date, you could do the same for DateTime. It a bit a matter of taste, but you could also make a DateTime type. If you want to have them as Long, you can use a custom scalar for Long as well. https://lacinia.readthedocs.io/en/latest/custom-scalars.html

finchharold08:03:05

Thank you and what about USER-DEFINED?

gklijs08:03:27

What do you mean? timestamp as input where it’s an union of several possibilities or something?

finchharold10:03:08

I got that covered my bad 🙂

emccue13:03:30

@U01MCFSB8Q2 Use a custom type that just wraps a unix time int

emccue13:03:44

(please don't send timestamps as strings)