Merge pull request #517 from simplificAR/rocket
Update Rocket to latest commit on master
This commit is contained in:
commit
620fb274d5
2
examples
2
examples
|
@ -1 +1 @@
|
|||
Subproject commit 4a5cfe2fc16061e8febd74b0e18f2d30b1cc07e5
|
||||
Subproject commit 64e75d3c3f0acbbf62412f966727581e96f70e0e
|
|
@ -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"] }
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user