zenstack
zenstack copied to clipboard
[Feature Request] Setting query defaults
Is your feature request related to a problem? Please describe.
Currently, I still have to run all args and findManyArgs instances through a resolver to set a take value based on auth.
Describe the solution you'd like
Setting a default take value in queries based on an auth() check, with maybe -1 to disable the limit.
@@take(10)
@@take(100, auth().role == user)
@@take(-1, auth().role == admin)