diff --git a/juniper_iron/src/lib.rs b/juniper_iron/src/lib.rs index 9bcb8634..82077d62 100644 --- a/juniper_iron/src/lib.rs +++ b/juniper_iron/src/lib.rs @@ -47,7 +47,7 @@ use juniper::{Context, EmptyMutation, EmptySubscription}; # Ok(&self.name) # } # -# fn friends(context: &Database) -> FieldResult> { +# fn friends(&self, context: &Database) -> FieldResult> { # Ok(self.friend_ids.iter() # .filter_map(|id| executor.context().users.get(id)) # .collect()) diff --git a/juniper_rocket_async/src/lib.rs b/juniper_rocket_async/src/lib.rs index ace26ce6..84168a35 100644 --- a/juniper_rocket_async/src/lib.rs +++ b/juniper_rocket_async/src/lib.rs @@ -41,7 +41,7 @@ Check the LICENSE file for details. use std::io::Cursor; use rocket::{ - data::{self, FromData}, + data::{self, FromData, ToByteUnit}, http::{ContentType, RawStr, Status}, outcome::Outcome::{Failure, Forward, Success}, request::{FormItems, FromForm, FromFormValue}, @@ -305,7 +305,7 @@ where Box::pin(async move { let mut body = String::new(); - let mut reader = data.open().take(BODY_LIMIT); + let mut reader = data.open(BODY_LIMIT.bytes()); if let Err(e) = reader.read_to_string(&mut body).await { return Failure((Status::InternalServerError, format!("{:?}", e))); }