Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed Nov 25, 2021
1 parent c404306 commit c085874
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion poem/starwars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
poem = "1.0.30"
7 changes: 4 additions & 3 deletions poem/starwars/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion poem/subscription/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
7 changes: 4 additions & 3 deletions poem/subscription/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion poem/token-from-header/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
7 changes: 4 additions & 3 deletions poem/token-from-header/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

0 comments on commit c085874

Please sign in to comment.