YeonHoPark
10/07/2021, 1:47 AMconst _user_ = _await prisma.user.findUnique_({
_where_:
{
_id_:
1,
},
})
_const userJson_ = _user.json as UserJson_
type UserJson = {
name: string
age: number
}
Dante
10/07/2021, 2:10 AMimport { User } from "@prisma/client";
It says your typeYeonHoPark
10/07/2021, 2:21 AMmodel User {
id String @id @default(cuid())
name String
json Json
}
what i say above is User.json typeDante
10/07/2021, 2:23 AM@node_modules/.prisma/client/index.d.ts
. It says all the types of your model in schema. that’s what I refer to.Ryan
10/07/2021, 6:15 AMYeonHoPark
10/07/2021, 6:21 AMRyan Westlake
04/07/2022, 10:01 PM