plezanje-net / api

NestJS GraphQL web server
GNU General Public License v3.0
7 stars 2 forks source link

Change case of AscentType enum keys and values to all lowercase. #176

Closed salamca closed 1 month ago

salamca commented 1 month ago

when using nests registerEnumType codegen generates an enum type that can be used in fe as well.

but codegen only considers enum keys of the source, which in generated.ts become values. if we want matching values (db has all lowercase) we need to use lowercase keys when defining an enum in an entity. not too nice, since it violates naming convention for enums in typescript, but don't sea a better option to make this work.

test also with https://github.com/plezanje-net/next-web/pull/49