manuel
07/08/2021, 8:40 AMDominic Hadfield
07/08/2021, 8:44 AMmanuel
07/08/2021, 8:47 AMmanuel
07/08/2021, 8:47 AMmanuel
07/08/2021, 8:48 AMDominic Hadfield
07/08/2021, 8:53 AMrejectOnNotFound
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)manuel
07/08/2021, 11:56 AM