Skip to content

Commit

Permalink
Bump examples loco-rs, axum, async-graphql and `async-graphql-a…
Browse files Browse the repository at this point in the history
…xum` dependencies (#2486)
  • Loading branch information
billy1624 authored Feb 5, 2025
1 parent e067978 commit 0e4bde4
Show file tree
Hide file tree
Showing 32 changed files with 4,938 additions and 2,721 deletions.
8 changes: 4 additions & 4 deletions examples/axum_example/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ publish = false
[dependencies]
axum-example-service = { path = "../service" }
tokio = { version = "1.34.0", features = ["full"] }
axum = "0.7.1"
tower = "0.4.13"
tower-http = { version = "0.5.0", features = ["fs"] }
tower-cookies = "0.10.0"
axum = "0.8"
tower = "0.5"
tower-http = { version = "0.6", features = ["fs"] }
tower-cookies = "0.11"
anyhow = "1.0.75"
dotenvy = "0.15.7"
serde = "1.0.193"
Expand Down
5 changes: 2 additions & 3 deletions examples/graphql_example/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ publish = false
[dependencies]
graphql-example-service = { path = "../service" }
tokio = { version = "1.29", features = ["full"] }
axum = "0.6.18"
axum-macros = "0.3"
axum = "0.8"
dotenvy = "0.15.7"
async-graphql-axum = "5.0.10"
async-graphql-axum = "7.0"
entity = { path = "../entity" }
migration = { path = "../migration" }
8 changes: 2 additions & 6 deletions examples/graphql_example/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ use axum::{
routing::get,
Router,
};
use axum_macros::debug_handler;
use graphql::schema::{build_schema, AppSchema};

#[cfg(debug_assertions)]
use dotenvy::dotenv;

#[debug_handler]
async fn graphql_handler(schema: State<AppSchema>, req: GraphQLRequest) -> GraphQLResponse {
schema.execute(req.into_inner()).await.into()
}
Expand All @@ -44,8 +42,6 @@ pub async fn main() {

println!("Playground: http://localhost:3000/api/graphql");

axum::Server::bind(&"0.0.0.0:3000".parse().unwrap())
.serve(app.into_make_service())
.await
.unwrap();
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
axum::serve(listener, app).await.unwrap();
}
2 changes: 1 addition & 1 deletion examples/graphql_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ path = "src/lib.rs"
serde = { version = "1", features = ["derive"] }

[dependencies.async-graphql]
version = "5.0.10"
version = "7.0"

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
Expand Down
Loading

0 comments on commit 0e4bde4

Please sign in to comment.