zenstackhq / zenstack

Fullstack TypeScript toolkit enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
https://zenstack.dev
MIT License
1.83k stars 78 forks source link

[Feature Request] Add prop as optional parameter of getEnhancedPrisma #1537

Open jasonmacdonald opened 6 days ago

jasonmacdonald commented 6 days ago

Is your feature request related to a problem? Please describe. The getEnhancedPrisma call for the NestJS module does not provide any information about the requested property. This limits the ability to decide whether to return the enhanced Prisma client or the original. While you can inject the enhanced or non-enhanced service as separate injections, this feature would allow for a more nuanced approach using the same service.

Describe the solution you'd like Pass the property being called to the getEnhancedPrisma.

Additional context I will follow up on this request with a pull request.