WIP on fixing graphql client
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
01cbca7a82
commit
ce2f6d458c
|
@ -730,12 +730,6 @@ version = "1.0.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
|
||||
|
||||
[[package]]
|
||||
name = "doc-comment"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
|
||||
|
||||
[[package]]
|
||||
name = "dotenv"
|
||||
version = "0.15.0"
|
||||
|
@ -1140,8 +1134,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "graphql-introspection-query"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/graphql-rust/graphql-client?branch=master#de2f4aeaa147864b86b7a8abe50f334d7d9f7518"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f2a4732cf5140bd6c082434494f785a19cfb566ab07d1382c3671f5812fed6d"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
@ -1168,26 +1163,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "graphql_client"
|
||||
version = "0.9.0"
|
||||
source = "git+https://github.com/graphql-rust/graphql-client?branch=master#de2f4aeaa147864b86b7a8abe50f334d7d9f7518"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9b58571cfc3cc42c3e8ff44fc6cfbb6c0dea17ed22d20f9d8f1efc4e8209a3f"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"doc-comment",
|
||||
"graphql_query_derive",
|
||||
"js-sys",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "graphql_client_codegen"
|
||||
version = "0.9.0"
|
||||
source = "git+https://github.com/graphql-rust/graphql-client?branch=master#de2f4aeaa147864b86b7a8abe50f334d7d9f7518"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4bf9cd823359d74ad3d3ecf1afd4a975f4ff2f891cdf9a66744606daf52de8c"
|
||||
dependencies = [
|
||||
"graphql-introspection-query",
|
||||
"graphql-parser 0.2.3",
|
||||
|
@ -1198,21 +1187,13 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"syn",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "graphql_client_web"
|
||||
version = "0.9.0"
|
||||
source = "git+https://github.com/graphql-rust/graphql-client?branch=master#de2f4aeaa147864b86b7a8abe50f334d7d9f7518"
|
||||
dependencies = [
|
||||
"graphql_client",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "graphql_query_derive"
|
||||
version = "0.9.0"
|
||||
source = "git+https://github.com/graphql-rust/graphql-client?branch=master#de2f4aeaa147864b86b7a8abe50f334d7d9f7518"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e56b093bfda71de1da99758b036f4cc811fd2511c8a76f75680e9ffbd2bb4251"
|
||||
dependencies = [
|
||||
"graphql_client_codegen",
|
||||
"proc-macro2",
|
||||
|
@ -1510,8 +1491,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "juniper"
|
||||
version = "0.15.6"
|
||||
source = "git+https://github.com/graphql-rust/juniper?branch=master#d4fda786ba663974bb5d0600e33cc85609837fbc"
|
||||
version = "0.15.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "637ffa8a8d8a05aed3331449e311f145864adcd82442d82e54d0522decb7cecf"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bson",
|
||||
|
@ -1531,8 +1513,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "juniper_codegen"
|
||||
version = "0.15.6"
|
||||
source = "git+https://github.com/graphql-rust/juniper?branch=master#d4fda786ba663974bb5d0600e33cc85609837fbc"
|
||||
version = "0.15.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a040e09482a45e77dd2dafa0d9d2651d17faf0ac674da0c93eabc3075ee24997"
|
||||
dependencies = [
|
||||
"proc-macro-error",
|
||||
"proc-macro2",
|
||||
|
@ -1541,9 +1524,10 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "juniper_rocket_async"
|
||||
version = "0.5.1"
|
||||
source = "git+https://github.com/graphql-rust/juniper?branch=master#d4fda786ba663974bb5d0600e33cc85609837fbc"
|
||||
name = "juniper_rocket"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c24868ce3d00537b353d2e18882133a317f504782730bb2979df00c1bfcc575c"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"juniper",
|
||||
|
@ -2694,7 +2678,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "rocket_cors"
|
||||
version = "0.5.2"
|
||||
source = "git+https://github.com/lawliet89/rocket_cors?branch=master#dfd3662c49e2f6fc37df35091cb94d82f7fb5915"
|
||||
source = "git+https://github.com/lawliet89/rocket_cors?branch=master#ad80993bcb420437a2998404bde51da9a9c0b151"
|
||||
dependencies = [
|
||||
"log",
|
||||
"regex",
|
||||
|
@ -3513,7 +3497,7 @@ dependencies = [
|
|||
"chrono",
|
||||
"jsonwebtoken",
|
||||
"juniper",
|
||||
"juniper_rocket_async",
|
||||
"juniper_rocket",
|
||||
"log",
|
||||
"prost",
|
||||
"rocket",
|
||||
|
@ -3576,7 +3560,6 @@ name = "tenebrous-web-ui"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"graphql_client",
|
||||
"graphql_client_web",
|
||||
"js-sys",
|
||||
"jsonwebtoken",
|
||||
"serde",
|
||||
|
|
|
@ -16,7 +16,9 @@ chrono = "0.4"
|
|||
serde = {version = "1.0", features = ["derive"] }
|
||||
serde_json = {version = "1.0" }
|
||||
tenebrous-rpc = { path = "../rpc" }
|
||||
juniper = { git = "https://github.com/graphql-rust/juniper", branch = "master" }
|
||||
juniper_rocket_async = { git = "https://github.com/graphql-rust/juniper", branch = "master" }
|
||||
# juniper = { git = "https://github.com/graphql-rust/juniper", branch = "master" }
|
||||
# juniper_rocket = { git = "https://github.com/graphql-rust/juniper", branch = "master" }
|
||||
juniper = "0.15.7"
|
||||
juniper_rocket = "0.8.0"
|
||||
rocket = { version = "0.5.0-rc.1", features = ["json", "secrets"] }
|
||||
rocket_cors = { git = "https://github.com/lawliet89/rocket_cors", branch = "master" }
|
||||
|
|
|
@ -10,25 +10,25 @@ use tracing_subscriber::filter::EnvFilter;
|
|||
|
||||
#[rocket::get("/")]
|
||||
fn graphiql() -> content::Html<String> {
|
||||
juniper_rocket_async::graphiql_source("/graphql", None)
|
||||
juniper_rocket::graphiql_source("/graphql", None)
|
||||
}
|
||||
|
||||
#[rocket::get("/graphql?<request>")]
|
||||
async fn get_graphql_handler(
|
||||
context: &State<Context>,
|
||||
request: juniper_rocket_async::GraphQLRequest,
|
||||
request: juniper_rocket::GraphQLRequest,
|
||||
schema: &State<Schema>,
|
||||
) -> juniper_rocket_async::GraphQLResponse {
|
||||
) -> juniper_rocket::GraphQLResponse {
|
||||
request.execute(&*schema, &*context).await
|
||||
}
|
||||
|
||||
#[rocket::post("/graphql", data = "<request>")]
|
||||
async fn post_graphql_handler(
|
||||
context: &State<Context>,
|
||||
request: juniper_rocket_async::GraphQLRequest,
|
||||
request: juniper_rocket::GraphQLRequest,
|
||||
schema: &State<Schema>,
|
||||
user: User,
|
||||
) -> juniper_rocket_async::GraphQLResponse {
|
||||
) -> juniper_rocket::GraphQLResponse {
|
||||
println!("User is {:?}", user);
|
||||
request.execute(&*schema, &*context).await
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ yewdux = { git = "https://github.com/intendednull/yewdux", rev = "v0.6.2"}
|
|||
wasm-bindgen = { version = "0.2" }
|
||||
wasm-bindgen-futures = "0.4"
|
||||
js-sys = "0.3"
|
||||
graphql_client = { git = "https://github.com/graphql-rust/graphql-client", branch = "master" }
|
||||
graphql_client_web = { git = "https://github.com/graphql-rust/graphql-client", branch = "master" }
|
||||
#graphql_client = { git = "https://github.com/graphql-rust/graphql-client", branch = "master" }
|
||||
#graphql_client_web = { git = "https://github.com/graphql-rust/graphql-client", branch = "master" }
|
||||
graphql_client = "0.10.0"
|
||||
serde = { version = "1.0.67", features = ["derive"] }
|
||||
serde_json = {version = "1.0" }
|
||||
thiserror = "1.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use graphql_client::web::Client;
|
||||
use graphql_client::Client;
|
||||
use graphql_client::GraphQLQuery;
|
||||
use graphql_client_web::Response;
|
||||
use graphql_client::Response;
|
||||
|
||||
use super::ResponseExt;
|
||||
use crate::error::UiError;
|
||||
|
@ -37,7 +37,7 @@ pub async fn get_user_variable(
|
|||
};
|
||||
|
||||
let response = client.call(GetUserVariable, variables).await?;
|
||||
let response: graphql_client_web::Response<get_user_variable::ResponseData> = response;
|
||||
let response: graphql_client::Response<get_user_variable::ResponseData> = response;
|
||||
Ok(response.data()?.variable.value)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue