import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient() async function main() { // ... you will write your Prisma Client queries here const story = await prisma.story.update({ where: { id: 1 }, data: { title: "Ghost Aliens of Mars", genres: { set: [{ id: 1 }, { id: 2 }], create: { name: "alien-punk" } } } }) console.log(story) } main() .then(async () => { await prisma.$disconnect() }) .catch(async (e) => { console.error(e) await prisma.$disconnect() process.exit(1) })