If I use the <https://github.com/prisma/nexus-pri...
# orm-help
m
If I use the https://github.com/prisma/nexus-prisma plugin I can still use nexus without it right?
d
correct, I am using it to bind the objects to the prisma models but I write my own resolvers
m
Thanks! Maybe you have experience with these resolver errors as well. I do get sometimes this wired resolver errors... what's the best way to debug these? I am on my way to remove the old prisma plugin and add the new one..
Thanks 😄
d
so the findUnique can potentially return null if the id does not exist, I use
rejectOnNotFound
to throw an error if the findUnique fails. Also, if the User can be null for an injection, it will throw as Prisma types will say user could be null. To resolve this, remove
nonNull
before the field, change the Prisma schema to mark that it cannot be null or (don’t do this)
@ts-expect-error
for the resolver (you will lose type safety)
m
Thanks for the help! 🙂