Authorization for inputs #1156
-
Hello First of all, How can I authorize inputs? I know it is not possible directly, but is there any trick? If not, I thought about creating some custom decorators which stores data and inputType property name to the in resolver: @MethodAuth() <------- here I want to get context
findUser(@Arg() @ArgAuth() filter: FindUserInput) {
} in inputType: @InputAuth({roles: ["ADMIN"]})
@Field({nullable: true})
email?: string |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The better design of API than authorized input fields is dedicated authorized mutations with enhanced input type. |
Beta Was this translation helpful? Give feedback.
The better design of API than authorized input fields is dedicated authorized mutations with enhanced input type.