paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
679 stars 55 forks source link

pal camel-case does not convert enums to camelCase #295

Open jason-nivelo opened 1 year ago

jason-nivelo commented 1 year ago

Given a schema with both models and enums, the models only get converted to camel-case and the enums are not

CatsMiaow commented 1 year ago

before

model test_pushed_data {
  data_status         test_pushed_data_data_status?
  pushed_data         Json
}

enum test_pushed_data_data_status {
  ...
}

after

model TestPushedData {
  dataStatus        test_pushedData_data_status? @map("data_status")
  pushedData        Json                         @map("pushed_data")
}

enum test_pushed_data_data_status {
  ...
}

Sometimes test_pushed_data_data_status is changed to test_pushedData_data_status due to the influence of other columns.