Prisma Disconnect Where

Hello,

Does someone know how I can disconnect a relation between 2 models based on the id's in an array?

I.e.
await prisma.project.update({
  where: {
    id: projectId
  },
  data: {
    users: {
      disconnect: {
        id: {
          // Disconnect all users that do not have the ID of one of those
          not: ["user_id_1", "user_id_45", "user_id_938"]
        }
      }
    }
  }
})
Was this page helpful?