<@U8UUUD5UP> thx, i understand the expected syntax...
# prisma-whats-new
m
@Fi1osof thx, i understand the expected syntax now. However, what would be the best way to parse my params in typescript? so far, i have held the input of my mutation to be an array of ides
participants: [ID]!
with an arbitary number of added participants. is there a quick&dirty typescript syntax to parse this ID- array to the required object array? Or should I change my input type? looping throug the ID-array seems really ugly. Can anyone tell me what would be the best practice here?
f
In mutation: let { participants, } = args; participants = participants.map(n => ({id: n})) And pass into db.mutation. Not?
m
Great, just the quick&dirty typescript func i was looking for 🙂 . Thanks a million, im still rather new to ts/js. SOLVED 👋
f
Your welcome!