Fork me on GitHub
#graphql
<
2017-09-05
>
andrewtropin13:09:48

Hey guys, how do live with camelCase in schema.edn? Want it to be kebab-case. Responses can be cameCased.

souenzzo15:09:27

I also have this problem

hlship16:09:07

One could imagine a filter that transformed a kebab-case schema to camelCased, before feeding it to com.walmartlabs.lacinia.schema/compile.

hlship16:09:00

However, I've been down that path before, and it gets confusing and ugly. GraphQL mandates camelCased (or underscores) and that's part of the spec; we could break it for Lacinia but that would, in turn, affect or break downstream tools such as GraphiQL. Better to accept the "ugly" names and eliminate the need for both code and developer to perform a mapping.

andrewtropin07:09:06

I took out snake_cased keywords out of my code, writing custom key function for jdbc and honeysql. Really, don't want to add camelCase to the project 😃 Thanks for the tip about converting before compile, maybe will do something like that.

andrewtropin07:09:26

I want to use Accept and Content-Type headers to convert request/response to proper case and keep downstream tools working out of the box.

hlship23:09:48

I'm curious who has done evaluations of Lacinia vs. other Clojure GraphQL libraries. What did you like and not like?