Comments (2)
Hi @nahtnam , thanks for filing this.
I checked the code and it seems next-admin has a hard-coded dependency to @prisma/client
and doesn't allow customize its typing. Have you tried casting the enhanced prismaclient back to PrismaClient
type and see if it works?
When using auth()
in @default()
, the only difference between zenstack-enhanced client and the original client's typing is the optionality of that field. It probably won't makes a real difference I suppose.
from zenstack.
Awesome, that seemed to do the trick! Do you know if there will ever be a case in the future where the change is not so type safe? Where type casting might cause issues?
In this case it's totally fine like you said because the types that the next-admin
library uses is stricter
from zenstack.
Related Issues (20)
- [BUG] Query Discrepancy with Selected Relation Fields HOT 2
- [Language Server] No autocompletion is provided when accessing `auth().`
- input error when querying compound key entry HOT 2
- [Feature Request] TRPC plugin should generate router procedure for permission checker
- Error - Maximum call stack size exceeded HOT 6
- Policy filtering should respect field-level access policies HOT 1
- [Feature Request] Reuse primitive types with validation rules
- [Feature Request] Compatibility with Prisma 5.14 `createManyAndReturn` HOT 3
- [Feature Request] Hono Support HOT 1
- [Feature Request] Supporting comparing fields of different models in policy rules HOT 1
- [Feature Request] Allow Disabling of Version Check HOT 1
- Prisma schema validation error - Relation map argument is too long HOT 1
- _count on inherited model not working HOT 2
- [Feature Request] Querying genererated API with fetch HOT 2
- [Feature Request] Stop certain access control rules not to be applied while connecting/disconnecting relationship HOT 1
- [TanStack Query] UseInfinite hooks should make the `initialPageParam` option field optional and use the args argument to fill it HOT 1
- [Feature Request] Access control for Prisma Pulse
- Polymorphic model with inherited relation error HOT 3
- Futures do not work with date fields HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zenstack.