Edmir Suljic
06/30/2021, 10:42 AMconst device = await prisma.device.findUnique({
where: {
deviceType: {
contains: args.data.deviceType
}
},
connect: {
user: {
id: userId
}
}
});
This obviously doesnt work but hopefully you would get the idea.Ryan
06/30/2021, 10:43 AMfindFirst
.Ryan
06/30/2021, 10:43 AMEdmir Suljic
06/30/2021, 10:53 AMRyan
06/30/2021, 10:54 AMctrl + space
is your friend. You can easily find all arguments and methods that need to be passed.Edmir Suljic
06/30/2021, 10:55 AMEdmir Suljic
06/30/2021, 10:57 AMonst device = await prisma.device.findFirst({
where: {
deviceType: args.data.deviceType
},
include: {
user: true
}
});