✨ Describe the feature you'd like
Currently, entrest breaks for views (ent.View), because it tries to generate the full range of CRUD operations, resulting in errors like ent/rest/create.go: undefined: ent.MyViewCreate.
Would be very nice and probably a low hanging fruit if entrest only generated readonly operations for Views.
This would tremendously extend the flexibility of the generated APIs. For example it would allow to:
- Model separate privacy policies for different fields of the same table (by excluding one in a view and not the other)
- Exposing metadata about fields/edges on an endpoint without exposing the actual data (e.g. returning the count of users instead of the user data)
- and so on
🌧 Is your feature request related to a problem?
No response
🔎 Describe alternatives you've considered
I tried annotating the type with entrest.WithIncludeOperations(entrest.OperationRead, entrest.OperationList), however that doesn't help either (presumably, because it only disables the handlers/mounting the handler fns, not the underlying code).
⚠ If implemented, do you think this feature will be a breaking change to users?
No
⚙ Additional context
No response
🤝 Requirements
✨ Describe the feature you'd like
Currently, entrest breaks for views (
ent.View), because it tries to generate the full range of CRUD operations, resulting in errors likeent/rest/create.go: undefined: ent.MyViewCreate.Would be very nice and probably a low hanging fruit if entrest only generated readonly operations for Views.
This would tremendously extend the flexibility of the generated APIs. For example it would allow to:
🌧 Is your feature request related to a problem?
No response
🔎 Describe alternatives you've considered
I tried annotating the type with
entrest.WithIncludeOperations(entrest.OperationRead, entrest.OperationList), however that doesn't help either (presumably, because it only disables the handlers/mounting the handler fns, not the underlying code).⚠ If implemented, do you think this feature will be a breaking change to users?
No
⚙ Additional context
No response
🤝 Requirements