@@ -6,7 +6,7 @@ use std::{
6
6
} ;
7
7
8
8
use async_graphql_parser:: types:: ExecutableDocument ;
9
- use futures_util:: stream:: { self , BoxStream , FuturesOrdered , Stream , StreamExt } ;
9
+ use futures_util:: stream:: { self , BoxStream , FuturesOrdered , StreamExt } ;
10
10
11
11
use crate :: {
12
12
BatchRequest , BatchResponse , CacheControl , ContextBase , EmptyMutation , EmptySubscription ,
@@ -574,7 +574,7 @@ where
574
574
& self ,
575
575
request : impl Into < Request > ,
576
576
session_data : Arc < Data > ,
577
- ) -> impl Stream < Item = Response > + Send + Unpin + ' static {
577
+ ) -> BoxStream < ' static , Response > {
578
578
let schema = self . clone ( ) ;
579
579
let request = request. into ( ) ;
580
580
let extensions = self . create_extensions ( session_data. clone ( ) ) ;
@@ -642,10 +642,7 @@ where
642
642
}
643
643
644
644
/// Execute a GraphQL subscription.
645
- pub fn execute_stream (
646
- & self ,
647
- request : impl Into < Request > ,
648
- ) -> impl Stream < Item = Response > + Send + Unpin {
645
+ pub fn execute_stream ( & self , request : impl Into < Request > ) -> BoxStream < ' static , Response > {
649
646
self . execute_stream_with_session_data ( request, Default :: default ( ) )
650
647
}
651
648
}
@@ -667,7 +664,6 @@ where
667
664
session_data : Option < Arc < Data > > ,
668
665
) -> BoxStream < ' static , Response > {
669
666
Schema :: execute_stream_with_session_data ( & self , request, session_data. unwrap_or_default ( ) )
670
- . boxed ( )
671
667
}
672
668
}
673
669
0 commit comments