I'm considering replacing my graphql sqlserver imp...
# orm-help
p
I'm considering replacing my graphql sqlserver implementation with Apollo and Prisma. I've got it basically working in NextJS, but I realize there is one step that is going to be a huge drag on the conversion and I'm wondering if there is a simple workaround like there is in EntityFramework which is what I'm converting from. Specifically, when. did the db pull, I got all my 100 or so tables like this:
Copy code
model DiscussionItem {
  Id           Int       @id(map: "PK__Discussi__3214EC0771E234E0") @default(autoincrement())
  DiscussionId Int
  AttendeesId  Int
  DateEntered  DateTime  @db.DateTime
  MessageText  String    @db.NVarChar(4000)
  Attendees    Attendees @relation(fields: [AttendeesId], references: [Id], onUpdate: NoAction, map: "DiscussionItem_fk")
}
The real hassle is that all of the schema begins with uppercase "I" and I want those properties to translate easily to camelcase on the ApolloServer side. That is, id, attendeesId, discussionId, etc. The issue is the accepted norm for database columns is begin with capital, the accept norm for JavaScript variables is begin with lowercase. Is there an option for that?
a
yep!
looks like:
Copy code
id Int @map("Id")
Oops, saw this was already answered here: https://prisma.slack.com/archives/CA491RJH0/p1644282604259129