Prisma, Authorization, Typescript, Web Development.
}, }); // Adam shouldn't be able to add Joe to the org because he's not admin await expect( adamDb.org.update({ where: { id: apple.id }, data: { members: { create: [ { user: { connect: { id: joe.id } }, role: 'MEMBER' }, ], }, }, }) ).rejects.toThrow(); // Emily should be able to create a resource