diff --git a/poem/starwars/Cargo.toml b/poem/starwars/Cargo.toml index 683f1b3..af7a5b4 100644 --- a/poem/starwars/Cargo.toml +++ b/poem/starwars/Cargo.toml @@ -8,4 +8,4 @@ async-graphql = { path = "../../.." } async-graphql-poem = { path = "../../../integrations/poem" } tokio = { version = "1.8", features = ["macros", "rt-multi-thread"] } starwars = { path = "../../models/starwars" } -poem = "1.0.19" \ No newline at end of file +poem = "1.0.30" \ No newline at end of file diff --git a/poem/starwars/src/main.rs b/poem/starwars/src/main.rs index 9bcb68e..914911e 100644 --- a/poem/starwars/src/main.rs +++ b/poem/starwars/src/main.rs @@ -20,7 +20,8 @@ async fn main() { let app = Route::new().at("/", get(graphql_playground).post(GraphQL::new(schema))); println!("Playground: http://localhost:8000"); - - let listener = TcpListener::bind("0.0.0.0:8000"); - Server::new(listener).await.unwrap().run(app).await.unwrap(); + Server::new(TcpListener::bind("0.0.0.0:8000")) + .run(app) + .await + .unwrap(); } diff --git a/poem/subscription/Cargo.toml b/poem/subscription/Cargo.toml index 7a03feb..d0b02f3 100644 --- a/poem/subscription/Cargo.toml +++ b/poem/subscription/Cargo.toml @@ -8,4 +8,4 @@ async-graphql = { path = "../../.." } async-graphql-poem = { path = "../../../integrations/poem" } tokio = { version = "1.8", features = ["macros", "rt-multi-thread"] } books = { path = "../../models/books" } -poem = { version = "1.0.19", features = ["websocket"] } +poem = { version = "1.0.30", features = ["websocket"] } diff --git a/poem/subscription/src/main.rs b/poem/subscription/src/main.rs index 9fff9ca..b33557c 100644 --- a/poem/subscription/src/main.rs +++ b/poem/subscription/src/main.rs @@ -27,7 +27,8 @@ async fn main() { .at("/ws", get(GraphQLSubscription::new(schema))); println!("Playground: http://localhost:8000"); - - let listener = TcpListener::bind("0.0.0.0:8000"); - Server::new(listener).await.unwrap().run(app).await.unwrap(); + Server::new(TcpListener::bind("0.0.0.0:8000")) + .run(app) + .await + .unwrap(); } diff --git a/poem/token-from-header/Cargo.toml b/poem/token-from-header/Cargo.toml index 7e1b4aa..88864f9 100644 --- a/poem/token-from-header/Cargo.toml +++ b/poem/token-from-header/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" async-graphql = { path = "../../.." } async-graphql-poem = { path = "../../../integrations/poem" } token = { path = "../../models/token" } -poem = { version = "1.0.19", features = ["websocket"] } +poem = { version = "1.0.30", features = ["websocket"] } tokio = { version = "1.8", features = ["macros", "rt-multi-thread"] } diff --git a/poem/token-from-header/src/main.rs b/poem/token-from-header/src/main.rs index ed35e16..dada52d 100644 --- a/poem/token-from-header/src/main.rs +++ b/poem/token-from-header/src/main.rs @@ -66,7 +66,8 @@ async fn main() { .data(schema); println!("Playground: http://localhost:8000"); - - let listener = TcpListener::bind("0.0.0.0:8000"); - Server::new(listener).await.unwrap().run(app).await.unwrap(); + Server::new(TcpListener::bind("0.0.0.0:8000")) + .run(app) + .await + .unwrap(); }