haskell-graphql / graphql-api

Write type-safe GraphQL services in Haskell
BSD 3-Clause "New" or "Revised" License
406 stars 35 forks source link

Custom Scalar Types? #162

Closed russmatney closed 6 years ago

russmatney commented 6 years ago

Is it possible/in the roadmap to allow users to implement custom scalars? Looking specifically to add a UUID scalar, but it feels like that should be possible from the app layer.

It looks possible to do custom validation via an input object type, but that'd essentially require parsing the text to a UUID twice, (once to validate, the second time to use it).

jml commented 6 years ago

I think this is what #151 is aiming at. Definitely in the roadmap (although bear in mind nobody is paid to work on this).

russmatney commented 6 years ago

Gotcha. Just wanted to be sure this functionality wasn't already available somewhere. Thanks much for the effort, it is much appreciated!