Interface: CrudOperations
Mapping of CRUD operations to their options.
Each key enables the matching operation; an empty object enables it with Wasp's defaults.
The default implementations map directly to Prisma calls on the entity, and
use the field marked with @id in the Prisma schema as the entity ID. Unless
an operation is marked with CrudOperationOptions.isPublic, Wasp
checks that an authenticated user is making the request.
CRUD operations are implemented with Wasp queries and actions. See Operations.
Propertiesโ
create?โ
optionalcreate?:CrudOperationOptions
Defaultโ
Entity.create({ data: args.data })
delete?โ
optionaldelete?:CrudOperationOptions
Defaultโ
Entity.delete({ where: { id: args.id } })
get?โ
optionalget?:CrudOperationOptions
Defaultโ
Entity.findUnique({ where: { id: args.id } })
getAll?โ
optionalgetAll?:CrudOperationOptions
Defaultโ
Entity.findMany()
update?โ
optionalupdate?:CrudOperationOptions
Defaultโ
Entity.update({ where: { id: args.id }, data: args.data })