Not sure how many times this has been asked before...
# prisma-client
r
Not sure how many times this has been asked before, but is there a preferred way of accessing custom claim from an access token inside a @Query()? I have a custom claim that has an array if strings I'd like to use in a query
where: { id: { in: identifiers } }
There is so much inception going on that I have hard time keeping up... Express -> NestJS -> Prisma
To give context. IAM is Auth0. Using Passport with JWKS configuration. NestJS with Prisma and GraphQL with Apollo
Got it working 😅
It was surprisingly easy with custom AuthGuard + ParamDecorator
Copy code
@UseGuards(GqlAuthGuard)
@Query()
async myQuery(@User() user: UserEntity) {
And now I can access the user object inside the Query
n
Glad to hear that you were able to get it working! 🙌
🙌 1