Prisma 1 Forum

Can I use "create" or "connect" in apollo Client to create nested mutations?

I have this mutation that works in the playground:
createUser(data: {
name: “Hugo”
lastName: “Licon”
password: “Nueva123$”,
salary: 3200.00
type:COURIER
courier: {
create: {
payrollType: “algo”
serviceType: “SAD”
licenseNumber: “123113322”
licenseExpiration: “2020-01-01”
broxelAccount: “123113322”
siValeAccount: “123113322”
}
}
address: {
create: {
street: “Ramirez”
neighborhood: “Centro”
zipcode: “32910”
municipality: {
connect: {
id: 66
}
}
}
}
}){
id
name
courier {
id
}
}
}

but I’m having trouble doing this in Apollo Client, so I’m wondering if this is even possible?

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.