From 251671d9fb76ae404b65866077d4e59ec50e3319 Mon Sep 17 00:00:00 2001 From: Brandon Konkle Date: Wed, 8 Jan 2025 12:43:40 -0700 Subject: [PATCH] Update async-graphql --- examples/async-graphql/Cargo.toml | 4 ++-- examples/async-graphql/src/domains/episodes/loaders.rs | 1 - examples/async-graphql/src/domains/profiles/loaders.rs | 1 - examples/async-graphql/src/domains/role_grants/loaders.rs | 1 - examples/async-graphql/src/domains/shows/loaders.rs | 1 - examples/async-graphql/src/domains/users/loaders.rs | 1 - examples/async-graphql/tests/test_events_integration.rs | 2 +- nakago_async_graphql/Cargo.toml | 4 ++-- 8 files changed, 5 insertions(+), 10 deletions(-) diff --git a/examples/async-graphql/Cargo.toml b/examples/async-graphql/Cargo.toml index 6c42430..0eecad3 100644 --- a/examples/async-graphql/Cargo.toml +++ b/examples/async-graphql/Cargo.toml @@ -15,11 +15,11 @@ integration = [] [dependencies] anyhow = "1.0" -async-graphql = { git = "https://github.com/bkonkle/async-graphql.git", branch = "update-http-axum", features = [ +async-graphql = { git = "https://github.com/aumetra/async-graphql", branch = "axum-0.8", features = [ "chrono", "dataloader", ] } -async-graphql-axum = { git = "https://github.com/bkonkle/async-graphql.git", branch = "update-http-axum" } +async-graphql-axum = { git = "https://github.com/aumetra/async-graphql", branch = "axum-0.8" } async-trait = "0.1" axum = { version = "0.8", features = ["ws", "macros"] } chrono = { version = "0.4.19", features = ["serde"] } diff --git a/examples/async-graphql/src/domains/episodes/loaders.rs b/examples/async-graphql/src/domains/episodes/loaders.rs index 7b354db..3d957ac 100644 --- a/examples/async-graphql/src/domains/episodes/loaders.rs +++ b/examples/async-graphql/src/domains/episodes/loaders.rs @@ -18,7 +18,6 @@ pub struct Loader { episodes: Arc>, } -#[async_trait] impl dataloader::Loader for Loader { type Value = Episode; type Error = FieldError; diff --git a/examples/async-graphql/src/domains/profiles/loaders.rs b/examples/async-graphql/src/domains/profiles/loaders.rs index bbcf933..231f3de 100644 --- a/examples/async-graphql/src/domains/profiles/loaders.rs +++ b/examples/async-graphql/src/domains/profiles/loaders.rs @@ -18,7 +18,6 @@ pub struct Loader { profiles: Arc>, } -#[async_trait] impl dataloader::Loader for Loader { type Value = Profile; type Error = FieldError; diff --git a/examples/async-graphql/src/domains/role_grants/loaders.rs b/examples/async-graphql/src/domains/role_grants/loaders.rs index 58fc15a..6b8fd25 100644 --- a/examples/async-graphql/src/domains/role_grants/loaders.rs +++ b/examples/async-graphql/src/domains/role_grants/loaders.rs @@ -18,7 +18,6 @@ pub struct Loader { role_grants: Arc>, } -#[async_trait] impl dataloader::Loader for Loader { type Value = RoleGrant; type Error = FieldError; diff --git a/examples/async-graphql/src/domains/shows/loaders.rs b/examples/async-graphql/src/domains/shows/loaders.rs index 0d34453..3c0ddf1 100644 --- a/examples/async-graphql/src/domains/shows/loaders.rs +++ b/examples/async-graphql/src/domains/shows/loaders.rs @@ -18,7 +18,6 @@ pub struct Loader { shows: Arc>, } -#[async_trait] impl dataloader::Loader for Loader { type Value = Show; type Error = FieldError; diff --git a/examples/async-graphql/src/domains/users/loaders.rs b/examples/async-graphql/src/domains/users/loaders.rs index 352b131..e3adb5d 100644 --- a/examples/async-graphql/src/domains/users/loaders.rs +++ b/examples/async-graphql/src/domains/users/loaders.rs @@ -18,7 +18,6 @@ pub struct Loader { locations: Arc>, } -#[async_trait] impl dataloader::Loader for Loader { type Value = User; type Error = FieldError; diff --git a/examples/async-graphql/tests/test_events_integration.rs b/examples/async-graphql/tests/test_events_integration.rs index 1905a72..d5c4ea3 100644 --- a/examples/async-graphql/tests/test_events_integration.rs +++ b/examples/async-graphql/tests/test_events_integration.rs @@ -20,7 +20,7 @@ async fn test_ping() -> Result<()> { let message = serde_json::to_string(&IncomingMessage::Ping)?; utils - .send_message(Message::Text(message), Some(&token), |read| { + .send_message(Message::Text(message.into()), Some(&token), |read| { read.take(1).for_each(|message| async { let data = message.unwrap().into_data(); let result = std::str::from_utf8(&data).unwrap(); diff --git a/nakago_async_graphql/Cargo.toml b/nakago_async_graphql/Cargo.toml index 2a087a5..76080cc 100644 --- a/nakago_async_graphql/Cargo.toml +++ b/nakago_async_graphql/Cargo.toml @@ -11,11 +11,11 @@ homepage.workspace = true [dependencies] anyhow = "1.0" -async-graphql = { version = "6.0", git = "https://github.com/bkonkle/async-graphql.git", branch = "update-http-axum", features = [ +async-graphql = { git = "https://github.com/aumetra/async-graphql", branch = "axum-0.8", features = [ "chrono", "dataloader", ] } -async-graphql-axum = { version = "6.0", git = "https://github.com/bkonkle/async-graphql.git", branch = "update-http-axum" } +async-graphql-axum = { git = "https://github.com/aumetra/async-graphql", branch = "axum-0.8" } async-trait = "0.1" axum = { version = "0.8", features = ["macros"] } derive-new = "0.7"