Option to have relations returned from findFirst/findMany be marked as optional

In a traditional database this isn't a problem, but with Planetscale it's possible for Typescript to lie to you and have one of the returns from a with { } be undefined despite the type being defined. Is there any option to have these be marked as optional to catch this on a type level?
1 Reply
Angelelz
Angelelz16mo ago
There is no such option, unfortunately. You'll have to do a runtime check
Want results from more Discord servers?
Add your server