Oliver Evans
10/30/2020, 7:45 PMschema.prisma
from nexus to programmatically expose my types.
Specifically, if I have the following in `schema.prisma`:
model Person {
name String
age Int
}
I would like to construct the following javascript object:
{
name: "String",
age: "Int"
}
Thanks!Ryan
11/02/2020, 7:42 AMUser
like this:
model User {
id Int @id @default(autoincrement())
name String
age String
}
You can import its type from the generated PrismaClient.
import type { User } from '@prisma/client'
And use this in your app.Oliver Evans
11/17/2020, 4:36 PM