Merge pull request #517 from simplificAR/rocket

Update Rocket to latest commit on master
This commit is contained in:
Sunli 2021-05-21 13:32:48 +08:00 committed by GitHub
commit 620fb274d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

@ -1 +1 @@
Subproject commit 4a5cfe2fc16061e8febd74b0e18f2d30b1cc07e5
Subproject commit 64e75d3c3f0acbbf62412f966727581e96f70e0e

View File

@ -16,7 +16,7 @@ categories = ["network-programming", "asynchronous"]
[dependencies]
async-graphql = { path = "../..", version = "=2.8.5" }
rocket = { git = "https://github.com/SergioBenitez/Rocket", rev = "2893ce7", default-features = false } # TODO: Change to Cargo crate when Rocket 0.5.0 is released
serde = "1.0.125"
rocket = { git = "https://github.com/SergioBenitez/Rocket", rev = "fa3e033", default-features = false } # TODO: Change to Cargo crate when Rocket 0.5.0 is released
serde = "1.0.126"
serde_json = "1.0.64"
tokio-util = { version = "0.6.5", default-features = false, features = ["compat"] }
tokio-util = { version = "0.6.7", default-features = false, features = ["compat"] }

View File

@ -12,6 +12,7 @@
#![forbid(unsafe_code)]
use std::io::Cursor;
use core::any::Any;
use async_graphql::http::MultipartOptions;
use async_graphql::{ObjectType, ParseRequestError, Schema, SubscriptionType};
@ -112,6 +113,12 @@ impl Request {
{
Response(schema.execute(self.0).await.into())
}
/// Insert some data for this request.
pub fn data<D: Any + Send + Sync>(mut self, data: D) -> Self {
self.0.data.insert(data);
self
}
}
impl From<Query> for Request {