Closed augustusnaz closed 4 years ago
Valid point and really easy fix. since you have proposed this change do you want to contribute it? I have no problem to do it next week but I think your code change will be enough.
Thank you so much for logging this issue. I did not seen or had situation like it so it is nice to get this feedback
Sweet! On it
Currently the directive resolvers
auth
,hasRole
etc only forwards graphql paramsroot
,args
,context
,info
.This is generally sufficient but is an issue when using with prisma/nexus and other plugins that many need to add more arguments.
In my case, graphql nexus adds a fourth argument that allows custom resolvers to intercept requests.
An example for a directiveResolver to solve this problem could look like this