how to make fields selection mandatory?

Currently, both select and include are optional fields, more of that it's possible to pass just true, without specifying every field:
prisma.post.create({
data: ...
include: {
user: true,
},
})
prisma.post.create({
data: ...
include: {
user: true,
},
})
how can i force prisma to make select or include mandatory and allow to pass only fields specifications instead of just true?
prisma.post.create({
data: ...
select: {
user: {
select: {
id: true,
name: true,
}
}
}
})
prisma.post.create({
data: ...
select: {
user: {
select: {
id: true,
name: true,
}
}
}
})
0 Replies
No replies yetBe the first to reply to this messageJoin