Hi guys, is there a way to batch- update a connect...
# prisma-whats-new
m
Hi guys, is there a way to batch- update a connect field? I would like to add a batch of participants to a group like so:
Copy code
return ctx.db.mutation.createGroup(
      {
        data: {
          participants:{
            connect: {
              ids: participants
            }
          }
        },
      },
      info
    )
Herein, participants is an array containing the user ids I would like to add. However, using connect produces an error when passing an array interpreting the input as a single id. Would connectMany do the trick? tried that but also got errors.