fix: upgrade actix-http to beta.17 and remove deprecated PayloadStream
This commit is contained in:
parent
f3d6f9319c
commit
3df3c3f86a
|
@ -14,7 +14,7 @@ categories = ["network-programming", "asynchronous"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-graphql = { path = "../..", version = "3.0.18" }
|
async-graphql = { path = "../..", version = "3.0.18" }
|
||||||
actix = "0.12.0"
|
actix = "0.12.0"
|
||||||
actix-http = "3.0.0-beta.15"
|
actix-http = "3.0.0-beta.17"
|
||||||
actix-web = { version = "4.0.0-beta.14", default-features = false }
|
actix-web = { version = "4.0.0-beta.14", default-features = false }
|
||||||
actix-web-actors = "4.0.0-beta.8"
|
actix-web-actors = "4.0.0-beta.8"
|
||||||
async-channel = "1.6.1"
|
async-channel = "1.6.1"
|
||||||
|
|
|
@ -4,7 +4,7 @@ use std::io::{self, ErrorKind};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
|
||||||
use actix_http::error::PayloadError;
|
use actix_http::error::PayloadError;
|
||||||
use actix_web::dev::{Payload, PayloadStream};
|
use actix_web::dev::Payload;
|
||||||
use actix_web::http::{Method, StatusCode};
|
use actix_web::http::{Method, StatusCode};
|
||||||
use actix_web::{http, Error, FromRequest, HttpRequest, HttpResponse, Responder, Result};
|
use actix_web::{http, Error, FromRequest, HttpRequest, HttpResponse, Responder, Result};
|
||||||
use futures_util::future::{self, FutureExt};
|
use futures_util::future::{self, FutureExt};
|
||||||
|
@ -33,7 +33,7 @@ impl FromRequest for GraphQLRequest {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Future = future::Map<<GraphQLBatchRequest as FromRequest>::Future, BatchToRequestMapper>;
|
type Future = future::Map<<GraphQLBatchRequest as FromRequest>::Future, BatchToRequestMapper>;
|
||||||
|
|
||||||
fn from_request(req: &HttpRequest, payload: &mut Payload<PayloadStream>) -> Self::Future {
|
fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future {
|
||||||
GraphQLBatchRequest::from_request(req, payload).map(|res| {
|
GraphQLBatchRequest::from_request(req, payload).map(|res| {
|
||||||
Ok(Self(
|
Ok(Self(
|
||||||
res?.0
|
res?.0
|
||||||
|
@ -61,7 +61,7 @@ impl FromRequest for GraphQLBatchRequest {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Future = Pin<Box<dyn Future<Output = Result<GraphQLBatchRequest>>>>;
|
type Future = Pin<Box<dyn Future<Output = Result<GraphQLBatchRequest>>>>;
|
||||||
|
|
||||||
fn from_request(req: &HttpRequest, payload: &mut Payload<PayloadStream>) -> Self::Future {
|
fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future {
|
||||||
let config = req
|
let config = req
|
||||||
.app_data::<MultipartOptions>()
|
.app_data::<MultipartOptions>()
|
||||||
.cloned()
|
.cloned()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user