Get type of `create` with `connect`?

db.course.create({
data: {
title: 'New course',
tutor: {
connect: {
id: 1
}
}
}
})
db.course.create({
data: {
title: 'New course',
tutor: {
connect: {
id: 1
}
}
}
})
I would like to get the type for object I pass to create function. How can I do that? I assume I should use internal Prisma utility types, right? The trick here is that tutor is a required property so it must be either created or connected (in my case, connected)
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server