Update rocket to 0.5.0-rc.1
This commit is contained in:
parent
0ed444654d
commit
6c15107ad4
|
@ -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"] }
|
||||
|
|
|
@ -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<Self, Self::Error> {
|
||||
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<Self, Self::Error> {
|
||||
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() {
|
||||
|
|
|
@ -28,7 +28,7 @@ pub async fn receive_body(
|
|||
/// Receive a GraphQL request from a content type and body.
|
||||
pub async fn receive_batch_body(
|
||||
content_type: Option<impl AsRef<str>>,
|
||||
body: impl AsyncRead + Send + 'static,
|
||||
body: impl AsyncRead + Send,
|
||||
opts: MultipartOptions,
|
||||
) -> Result<BatchRequest, ParseRequestError> {
|
||||
let content_type = content_type.as_ref().map(AsRef::as_ref);
|
||||
|
|
|
@ -39,7 +39,7 @@ impl MultipartOptions {
|
|||
}
|
||||
|
||||
pub(super) async fn receive_batch_multipart(
|
||||
body: impl AsyncRead + Send + 'static,
|
||||
body: impl AsyncRead + Send,
|
||||
boundary: impl Into<String>,
|
||||
opts: MultipartOptions,
|
||||
) -> Result<BatchRequest, ParseRequestError> {
|
||||
|
|
Loading…
Reference in New Issue
Block a user