I’m trying to `disconnect` several relations that ...
# orm-help
i
I’m trying to
disconnect
several relations that do not match the incoming relations to replace. Current
connection
when created looks like:
Copy code
const field = await ctx.db.mutation.createField({
    data: {
      ...data,
      values: { set: values },
      read: {
        connect: read.map(role => ({
          type: role
        }))
      },
      write: {
        connect: write.map(role => ({
          type: role
        }))
      }
    }
  });
I’m unsure of how to do this kind of update, I’ve played around with the
role_some
,
role_every
,
role_none
, but I’m still rather confused on what each of those mean and how they work specifically. Thanks!!
n
role_some
,
role_every
and
role_none
are completely unrelated to
disconnect
.
those are filter conditions that you can use in
where
🙌 1
i
Good to know, thank you sir!
n
you're welcome 🙂