WaspW
Wasp3y ago
PabloIL

How to delete entities?

I've gone through the basic tutorial and I want to keep going in order to learn.

How would I go about deleting a prisma entry?
In this context, deleting one of the to-do tasks.

I imagine the structure would have to look something like this:

export const deleteTask = async (args, context) => {
return context.entities.Task.delete({
where: { id: args.taskId },
data: {}
})
}

Thank you!
Was this page helpful?