Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extended types #3

Open
oliyh opened this issue Nov 30, 2017 · 2 comments
Open

Support extended types #3

oliyh opened this issue Nov 30, 2017 · 2 comments

Comments

@oliyh
Copy link
Owner

oliyh commented Nov 30, 2017

E.g.

{:type String :locksmith/type UUID}

Which would then transform it from a String to a UUID or vice versa in the transforms

@madstap
Copy link

madstap commented May 30, 2018

Isn't this already covered by custom scalars?

@oliyh
Copy link
Owner Author

oliyh commented May 31, 2018

Hi @madstap,

No, it's not quite the same thing. This was intended to help with the fact that we start with edn data structures including sets, #inst, #uuid etc and lose a lot of them as they go through JSON serialisation to get to the client. The idea here is that we can leave hints in the schema so that the client side can get them back using locksmith.

Thinking about it now though, that might be a better use case for spec and conformers, and you can think of locksmith as just sorting out the keys first so that you can write your spec with idiomatic Clojure keys.

So this probably won't get implemented but it might be worth some documentation to show how you might use it in the real world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants