Is it normal prisma fluent api consider non-nullab...
# orm-help
m
Is it normal prisma fluent api consider non-nullable relations as nullable ?
r
No it’s a bug. I see you have opened an issue and there’s also a related issue for the same here.
👍 1
m
I was wondering if it's normal because
findUnique
can actually return null. So it may be logic that relation query return null also. But thanks to confirm it's a bug ^^
r
It can but only if
rejectOnNotFound
is set to false. Otherwise it can return
null
.
Also non-nullable relations should not be considered as nullable. So I guess those are two separate things that you’re asking.
m
My only concern is to make this code working 😁
r
Only way for now would be to either remove the
nonNull
or not use the fluent API and stick to
include
.
🙌 1
m
thx Ryan 😉
🙌 1