diff --git a/integrations/rocket/Cargo.toml b/integrations/rocket/Cargo.toml index aac418f3..a627f427 100644 --- a/integrations/rocket/Cargo.toml +++ b/integrations/rocket/Cargo.toml @@ -16,7 +16,7 @@ categories = ["network-programming", "asynchronous"] [dependencies] async-graphql = { path = "../..", version = "=2.9.2" } -rocket = { git = "https://github.com/SergioBenitez/Rocket", rev = "fa3e033", default-features = false } # TODO: Change to Cargo crate when Rocket 0.5.0 is released +rocket = { version = "0.5.0-rc.1", default-features = false } serde = "1.0.126" serde_json = "1.0.64" tokio-util = { version = "0.6.7", default-features = false, features = ["compat"] } diff --git a/integrations/rocket/src/lib.rs b/integrations/rocket/src/lib.rs index c6bf3ad1..f9f58e5b 100644 --- a/integrations/rocket/src/lib.rs +++ b/integrations/rocket/src/lib.rs @@ -56,10 +56,7 @@ impl BatchRequest { impl<'r> FromData<'r> for BatchRequest { type Error = ParseRequestError; - async fn from_data( - req: &'r rocket::Request<'_>, - data: Data, - ) -> data::Outcome { + async fn from_data(req: &'r rocket::Request<'_>, data: Data<'r>) -> data::Outcome<'r, Self> { let opts: MultipartOptions = req.rocket().state().copied().unwrap_or_default(); let request = async_graphql::http::receive_batch_body( @@ -177,10 +174,7 @@ impl Query { impl<'r> FromData<'r> for Request { type Error = ParseRequestError; - async fn from_data( - req: &'r rocket::Request<'_>, - data: Data, - ) -> data::Outcome { + async fn from_data(req: &'r rocket::Request<'_>, data: Data<'r>) -> data::Outcome<'r, Self> { BatchRequest::from_data(req, data) .await .and_then(|request| match request.0.into_single() {