Working graphql

This commit is contained in:
projectmoon 2021-06-05 14:48:40 +00:00
parent 4776b6f739
commit 6dfc9119f7
2 changed files with 496 additions and 139 deletions

628
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -125,15 +125,16 @@ fn post_graphql_handler(
#[rocket::main]
pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("hi");
let filter = if env::var("RUST_LOG").is_ok() {
EnvFilter::from_default_env()
} else {
EnvFilter::new("warp_async")
EnvFilter::new("tenebrous_api=info,tonic=info,rocket=info")
};
tracing_subscriber::fmt().with_env_filter(filter).init();
let log = warp::log("warp_server");
log::info!("Setting up gRPC connection");
let client = create_client("abc123").await?;
log::info!("Listening on 127.0.0.1:8080");
@ -142,7 +143,7 @@ pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
};
Rocket::build()
.manage(client)
.manage(context)
.manage(schema())
.mount(
"/",