-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improve CRUD operations default implementations #1253
Comments
Ideas for validation:
|
Hi @infomiho @Martinsos , I just stumbled upon this issue when checking out Wasp (very cool!). I'm the creator of ZenStack, which is a full-stack toolkit based on Prisma. One of the main things it does is to extend PSL and add a flexible access control layer there - both at the schema level and at runtime. The Prisma's query API is fully preserved and authorization works transparently under the hood. Do you think it's an interesting idea to integrate ZenStack with Wasp? It'll probably look like:
Not sure if you guys already started to work on an authz solution yet. |
@Case-E had some interesting insights into extending automatic CRUD! Discord convo: https://discord.com/channels/686873244791210014/867713251479519232/1231994987156340736 and https://discord.com/channels/686873244791210014/867713251479519232/1234893790708240414 . Important bits:
|
We implemented CRUD operations that automatically generate queries and actions based of an entity that user defined.
The default operations are pretty basic:
Downsides of the current default implementations
Users have to override the default implementation to get those behaviours. This makes the CRUD operations less useful and appealing. The goal is to add certain features to Wasp to make the CRUD operations by default powerful enough for most common use cases.
Some thing we can do
Authorization
It would enable the user to define which users are allowed to perform which operations and on which resources.
Input validation
Save only valid data instead of saving everything that comes from the frontend.
Customization through Wasp DSL
We want to give users some knobs to turn in the Wasp DSL to customize the CRUD operations without writing JS code. Things like:
Customization through pre/post hooks
Check things before operation is executed or perform some action after the operation is executed.
The text was updated successfully, but these errors were encountered: