/// The user that is authenticated with the associated token (`token`)
The user that is authenticated with the associated token (`token`)
The user that is authenticated with the associated token ( ` token ` )
pub async fn user(&self, context: &async_graphql::Context<'_>) -> Result<Option<User>> {
        let (db, _) = Context::parse(context)?;
        let result = User::collection(&db)
            .find_one(doc! { "_id": self.user_id }, None)
            .await?;
        Ok(result)
    }
pub async fn user ( & self , context : & async_graphql :: Context < ' _ > ) -> Result < Option < User > > { let ( db , _ ) = Context :: parse ( context ) ? ; let result = User :: collection ( & db ) . find_one ( doc ! { " " self user_id } , None ) . await ? ; Ok ( result ) }
The user that is authenticated with the associated token (`token`)
The user that is authenticated with the associated token ( ` token ` )
&self
context
&async_graphql::Context<'_>