-
In this line[1] of the authentication example, how to get the currently logged user from context? @Resolver((_of) => Post)
export class PostResolver {
@Authorized()
@Query(() => [Post])
async allPosts() {
// GET THE CURRENT LOGGED USER HERE
return await PostModel.find()
}
} 1 - |
Beta Was this translation helpful? Give feedback.
Answered by
skhaz
Feb 16, 2022
Replies: 1 comment
-
Found it, I just need to use |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
skhaz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found it, I just need to use
@Ctx