From 1e348ea1bdc1c7c42f7ae0553c3ae5aa56292aba Mon Sep 17 00:00:00 2001 From: Graeme Coupar Date: Wed, 21 Aug 2019 12:40:43 +0100 Subject: [PATCH] Update for latest rust nightly --- juniper_rocket/src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/juniper_rocket/src/lib.rs b/juniper_rocket/src/lib.rs index c50f747d..9ebe0bbf 100644 --- a/juniper_rocket/src/lib.rs +++ b/juniper_rocket/src/lib.rs @@ -117,7 +117,7 @@ where #[cfg(feature = "async")] pub async fn execute_async<'a, CtxT, QueryT, MutationT>( &'a self, - root_node: &'a RootNode, + root_node: &'a RootNode<'_, QueryT, MutationT, S>, context: &CtxT, ) -> GraphQLBatchResponse<'a, S> where @@ -128,14 +128,14 @@ where &GraphQLBatchRequest::Single(ref request) => { GraphQLBatchResponse::Single(request.execute_async(root_node, context).await) } - &GraphQLBatchRequest::Batch(ref requests) => GraphQLBatchResponse::Batch( + &GraphQLBatchRequest::Batch(ref requests) => { let futures = requests .iter() - .map(|request| request.execute(root_node, context)) - .collect::>(), + .map(|request| request.execute_async(root_node, context)) + .collect::>(); - let responses = futures03::future::join_all(futures).await; - ), + GraphQLBatchResponse::Batch(futures03::future::join_all(futures).await) + }, } } @@ -218,7 +218,7 @@ where #[cfg(feature = "async")] pub async fn execute_async( &self, - root_node: &RootNode, + root_node: &RootNode<'_, QueryT, MutationT, S>, context: &CtxT, ) -> GraphQLResponse where