From 751168154f990558295f432f9d8180052fe50d68 Mon Sep 17 00:00:00 2001 From: SolidStateDrive Date: Tue, 28 Apr 2026 23:13:33 +0200 Subject: [PATCH] update juniper to 0.17 but fr this time --- Cargo.lock | 321 +++-------------------------------------- Cargo.toml | 10 +- src/graphql/mod.rs | 5 +- src/main.rs | 2 - src/nnid/agreements.rs | 2 +- 5 files changed, 29 insertions(+), 311 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba97d28..3e67cb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ dependencies = [ "hex", "hickory-resolver", "hmac", - "juniper 0.17.1", + "juniper", "juniper_rocket", "k256", "lettre", @@ -47,8 +47,6 @@ dependencies = [ "thiserror 2.0.18", "time", "tokio", - "tonic", - "tonic-build", ] [[package]] @@ -364,53 +362,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" -[[package]] -name = "axum" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" -dependencies = [ - "async-trait", - "axum-core", - "bytes", - "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "http-body-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper", - "tower 0.5.2", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper", - "tower-layer", - "tower-service", -] - [[package]] name = "backtrace" version = "0.3.74" @@ -1069,12 +1020,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fixedbitset" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" - [[package]] name = "flume" version = "0.11.1" @@ -1130,7 +1075,6 @@ checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -1181,17 +1125,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "futures-sink" version = "0.3.31" @@ -1213,7 +1146,6 @@ dependencies = [ "futures-channel", "futures-core", "futures-io", - "futures-macro", "futures-sink", "futures-task", "memchr", @@ -1326,7 +1258,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.7.1", + "indexmap", "slab", "tokio", "tokio-util", @@ -1345,19 +1277,13 @@ dependencies = [ "futures-core", "futures-sink", "http 1.2.0", - "indexmap 2.7.1", + "indexmap", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.15.2" @@ -1375,7 +1301,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.15.2", + "hashbrown", ] [[package]] @@ -1590,7 +1516,6 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "httparse", - "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -1615,19 +1540,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "hyper-timeout" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" -dependencies = [ - "hyper 1.6.0", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - [[package]] name = "hyper-tls" version = "0.6.0" @@ -1837,16 +1749,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.7.1" @@ -1854,7 +1756,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown", "serde", ] @@ -1938,23 +1840,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "juniper" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943306315b1a7a03d27af9dfb0c288d9f4da8830c17df4bceb7d50a47da0982c" -dependencies = [ - "async-trait", - "auto_enums", - "fnv", - "futures", - "indexmap 2.7.1", - "juniper_codegen 0.16.0", - "serde", - "smartstring", - "static_assertions", -] - [[package]] name = "juniper" version = "0.17.1" @@ -1969,26 +1854,14 @@ dependencies = [ "derive_more", "fnv", "futures", - "indexmap 2.7.1", + "indexmap", "itertools", - "juniper_codegen 0.17.0", + "juniper_codegen", "ref-cast", "serde", "static_assertions", ] -[[package]] -name = "juniper_codegen" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760dbe46660494d469023d661e8d268f413b2cb68c999975dcc237407096a693" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "url", -] - [[package]] name = "juniper_codegen" version = "0.17.0" @@ -2004,14 +1877,14 @@ dependencies = [ [[package]] name = "juniper_rocket" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce74561b72a9aab16a16df022d7b6551fa8018b0cedfe2187417eeb602b65b3e" +checksum = "9f74cfeb272343768eebb530fafbcbaea85e22f1be0ddd96f4c4839da5b352da" dependencies = [ + "derive_more", "either", - "futures", "inlinable_string", - "juniper 0.16.1", + "juniper", "pear", "rocket", "serde_json", @@ -2183,12 +2056,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "md-5" version = "0.10.6" @@ -2261,12 +2128,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "multimap" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" - [[package]] name = "native-tls" version = "0.2.14" @@ -2538,36 +2399,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "petgraph" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" -dependencies = [ - "fixedbitset", - "indexmap 2.7.1", -] - -[[package]] -name = "pin-project" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -2673,26 +2504,6 @@ dependencies = [ "prost-derive", ] -[[package]] -name = "prost-build" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" -dependencies = [ - "heck", - "itertools", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn", - "tempfile", -] - [[package]] name = "prost-derive" version = "0.13.5" @@ -2706,15 +2517,6 @@ dependencies = [ "syn", ] -[[package]] -name = "prost-types" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" -dependencies = [ - "prost", -] - [[package]] name = "quick-xml" version = "0.37.5" @@ -2920,7 +2722,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tower 0.5.2", + "tower", "tower-service", "url", "wasm-bindgen", @@ -2973,7 +2775,7 @@ dependencies = [ "either", "figment", "futures", - "indexmap 2.7.1", + "indexmap", "log", "memchr", "multer", @@ -3005,7 +2807,7 @@ checksum = "575d32d7ec1a9770108c879fc7c47815a80073f96ca07ff9525a94fcede1dd46" dependencies = [ "devise", "glob", - "indexmap 2.7.1", + "indexmap", "proc-macro2", "quote", "rocket_http", @@ -3042,7 +2844,7 @@ dependencies = [ "futures", "http 0.2.12", "hyper 0.14.32", - "indexmap 2.7.1", + "indexmap", "log", "memchr", "pear", @@ -3491,17 +3293,6 @@ dependencies = [ "serde", ] -[[package]] -name = "smartstring" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" -dependencies = [ - "autocfg", - "static_assertions", - "version_check", -] - [[package]] name = "socket2" version = "0.5.8" @@ -3571,9 +3362,9 @@ dependencies = [ "futures-intrusive", "futures-io", "futures-util", - "hashbrown 0.15.2", + "hashbrown", "hashlink", - "indexmap 2.7.1", + "indexmap", "ipnetwork", "log", "memchr", @@ -4055,77 +3846,13 @@ version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ - "indexmap 2.7.1", + "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow", ] -[[package]] -name = "tonic" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64", - "bytes", - "h2 0.4.8", - "http 1.2.0", - "http-body 1.0.1", - "http-body-util", - "hyper 1.6.0", - "hyper-timeout", - "hyper-util", - "percent-encoding", - "pin-project", - "prost", - "socket2 0.5.8", - "tokio", - "tokio-stream", - "tower 0.4.13", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tonic-build" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "prost-types", - "quote", - "syn", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.5", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tower" version = "0.5.2" @@ -4510,7 +4237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", - "indexmap 2.7.1", + "indexmap", "wasm-encoder", "wasmparser", ] @@ -4522,8 +4249,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ "bitflags", - "hashbrown 0.15.2", - "indexmap 2.7.1", + "hashbrown", + "indexmap", "semver", ] @@ -4936,7 +4663,7 @@ checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" dependencies = [ "anyhow", "heck", - "indexmap 2.7.1", + "indexmap", "prettyplease", "syn", "wasm-metadata", @@ -4967,7 +4694,7 @@ checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", "bitflags", - "indexmap 2.7.1", + "indexmap", "log", "serde", "serde_derive", @@ -4986,7 +4713,7 @@ checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" dependencies = [ "anyhow", "id-arena", - "indexmap 2.7.1", + "indexmap", "log", "semver", "serde", diff --git a/Cargo.toml b/Cargo.toml index df26e9b..117fb75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,9 +41,8 @@ sentry = "0.38.0" rocket_cors = "0.6.0" juniper = { version = "0.17.0", features = ["chrono"] } -juniper_rocket = "0.9.0" +juniper_rocket = "0.10.0" -tonic = "0.12.3" prost = "0.13.4" lettre = "0.11.15" rand = "0.8.5" @@ -56,9 +55,4 @@ k256 = "0.13.4" dsa = "0.6.3" openssl = "0.10.78" time = "0.3.47" -hickory-resolver = { version = "0.24", features = ["tokio-runtime"] } - - - -[build-dependencies] -tonic-build = "0.12.3" +hickory-resolver = { version = "0.24", features = ["tokio-runtime"] } \ No newline at end of file diff --git a/src/graphql/mod.rs b/src/graphql/mod.rs index 1c916f1..633be82 100644 --- a/src/graphql/mod.rs +++ b/src/graphql/mod.rs @@ -30,7 +30,6 @@ impl<'r> FromRequest<'r> for Context { } pub type Schema = RootNode< - 'static, Query, EmptyMutation, EmptySubscription @@ -220,7 +219,7 @@ pub async fn get_graphql( schema: &State, context: Context ) -> juniper_rocket::GraphQLResponse { - request.execute(schema, &context).await + request.execute(schema.inner(), &context).await } #[rocket::post("/graphql", data = "")] @@ -229,5 +228,5 @@ pub async fn post_graphql( schema: &State, context: Context ) -> juniper_rocket::GraphQLResponse { - request.execute(schema, &context).await + request.execute(schema.inner(), &context).await } diff --git a/src/main.rs b/src/main.rs index e645798..c6bf40f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,4 @@ use std::env; -use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use std::time::{SystemTime, UNIX_EPOCH}; use dotenvy::dotenv; use juniper::{EmptyMutation, EmptySubscription}; @@ -10,7 +9,6 @@ use rocket::response::content::RawXml; use rocket_cors::{AllowedOrigins, CorsOptions}; use sqlx::Postgres; use sqlx::postgres::PgPoolOptions; -use tonic::transport::Server; use crate::graphql::{Query, Schema}; mod xml; diff --git a/src/nnid/agreements.rs b/src/nnid/agreements.rs index 16d610f..cc97c70 100644 --- a/src/nnid/agreements.rs +++ b/src/nnid/agreements.rs @@ -8,7 +8,7 @@ use rocket::request::{FromRequest, Outcome}; use rocket::response::content::RawXml; use tokio::fs::try_exists; use tokio::sync::RwLock; -use tonic::async_trait; +use rocket::async_trait; use crate::dsresponse::Ds; pub static EVIL_AGREEMENT_THING: Lazy>> = Lazy::new(|| Default::default());