-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(client): extensions generic type api #16936
Conversation
…/client-ext-generic-type-api
…/client-ext-generic-type-api
Note: @millsp Looks like there is a conflict to solve |
…/client-ext-generic-type-api
Is there any documentation (or examples) on how to use this? |
This PR enables extensions to deal with input and output types in generic extensions to be able to augment them dynamically on any given model. For this, three new utilities appeared:
Exact
: Enforces exact type inputs, no more, no less while also narrowing inputArgs
: Dynamically retrieve the input type of a given model and a given operationResult
: Takes the input types and gives the result for a given model and operationPayload
: Retrieve the payload output types which represent scalars & relations objectsThe gist:
closes #17236
closes #17339
closes #16600
closes #17258
closes https://github.com/prisma/client-planning/issues/214
closes https://github.com/prisma/client-planning/issues/210