WorksHub / leona

spec -> lacinia schema
Eclipse Public License 1.0
36 stars 17 forks source link

Update automatic name conversion to use `PascalCase` #17

Closed acron0 closed 5 years ago

acron0 commented 5 years ago

The powers that be would prefer if the automatic name conversion that currently performs snake_case on Object names, would use PascalCase instead, as it's more idiomatic for GraphQL.

This would mean a new util function that performs this, using the new function on Object name conversions, then updating of any tests that hard code snake_case Object names (they probably shouldn't). The documentation will also need updating.

JPRoland commented 5 years ago

I started working on this and figured I better ask before I get too far in, there are two functions that perform snake_case on the names, clj-name->gql-name and clj-name->qualified-gql-name. Do both of them need changed or just the first one?

acron0 commented 5 years ago

@JPRoland That's a good question. The second function uses underscores to encode Clojure namespace into the name, and that process should continue to happen, so we end up with a process like :my-ns/my-thing => MyNs__MyThing

acron0 commented 5 years ago

There is a mistake in this issue. It used to imply that all names should be PascalCase but this should reaad Object names. It's now been adjusted.