clj-commons / camel-snake-kebab

A Clojure[Script] library for word case conversions
https://clj-commons.org/camel-snake-kebab/
Eclipse Public License 1.0
475 stars 49 forks source link

Fix transform-keys clears metadata ( #73 ) #79

Closed johngrib closed 2 years ago

johngrib commented 2 years ago

Hello. I've found the issue 73 hasn't been resolved yet.

https://github.com/clj-commons/camel-snake-kebab/issues/73

I'm using lacinia(a graphql implementation) and camel-snake-kebab together these days. And I found that when camel-snake-kebab did the case transformations, the metadata that was on the input was lost on the return value.

In lacinia, when using a union type, the types of the objects are recorded in the each object's metadata. And it passes the types in the metadata to the client.

So I found the issue while researching to fix this issue.

I'm not a native English speaker, so my sentences may read unnaturally. thank you.

qerub commented 2 years ago

Thanks! 👍🏻

jungwookim commented 2 years ago

Thanks @johngrib ! Could you release a new version including this one? @qerub

qerub commented 2 years ago

There's now a 0.4.3 release with this change: https://clojars.org/camel-snake-kebab/versions/0.4.3