-
Notifications
You must be signed in to change notification settings - Fork 364
Closed
Description
So I've been hammering away at this for a day and I can't seem to get even basic queries to work with mono or flux.
Below is an example of a query to a user profile from the identity store. If I convert this into a future it works out of the box, but the moment I use a mono i get all my fields as null
{"data":{"currentUserProfile":{"firstname":null,"lastname":null,"username":null,"emailAddress":null}}}
And the query code:
@PreAuthorize("isAuthenticated()")
fun currentUserProfile(context: GraphQLSecurityContext): Mono<UserProfile> {
return context.securityContext.flatMap { sc ->
val details = sc.authentication.details as UserCredential
userIdentityService.findById(details.id).map { UserProfile.fromUserIdentity(it) }
}
I don't seem to have a problem generating schema with mono. I have registered a monad hook, but it seems to do nothing.
Is there something I'm doing wrong? I know it does call the query method, but I can't seem to figure out I get a null response.
senthilsivanath
Metadata
Metadata
Assignees
Labels
No labels