@@ -44,15 +44,15 @@ Check the LICENSE file for details.
44
44
use actix_web:: { web, Error , HttpResponse } ;
45
45
use juniper:: {
46
46
graphiql:: graphiql_source,
47
- http:: { playground:: playground_source, GraphQLBatchRequest } ,
47
+ http:: { playground:: playground_source, GraphQLBatchRequest , GraphQLRequest } ,
48
48
ScalarValue ,
49
49
} ;
50
50
51
51
/// Actix GraphQL Handler for GET requests
52
52
pub async fn get_graphql_handler < Query , Mutation , Subscription , Context , S > (
53
53
schema : & juniper:: RootNode < ' static , Query , Mutation , Subscription , S > ,
54
54
context : & Context ,
55
- req : web:: Query < GraphQLBatchRequest < S > > ,
55
+ req : web:: Query < GraphQLRequest < S > > ,
56
56
) -> Result < HttpResponse , Error >
57
57
where
58
58
S : ScalarValue + Send + Sync + ' static ,
@@ -64,12 +64,12 @@ where
64
64
Subscription : juniper:: GraphQLSubscriptionType < S , Context = Context > + Send + Sync + ' static ,
65
65
Subscription :: TypeInfo : Send + Sync ,
66
66
{
67
- let gql_batch_response = req. execute ( schema, context) . await ;
67
+ let gql_response = req. execute ( schema, context) . await ;
68
68
69
- let gql_response = serde_json:: to_string ( & gql_batch_response ) ?;
69
+ let response = serde_json:: to_string ( & gql_response ) ?;
70
70
Ok ( HttpResponse :: Ok ( )
71
71
. content_type ( "application/json" )
72
- . body ( gql_response ) )
72
+ . body ( response ) )
73
73
}
74
74
/// Actix GraphQL Handler for POST requests
75
75
pub async fn post_graphql_handler < Query , Mutation , Subscription , Context , S > (
0 commit comments