Skip to content

Commit 58f6249

Browse files
committed
Fixed tests and examples and runned cargo fmt
1 parent 2f85a0d commit 58f6249

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

juniper_actix/examples/actix_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ extern crate log;
44
use actix_cors::Cors;
55
use actix_web::{middleware, web, App, Error, HttpResponse, HttpServer};
66
use juniper::{
7-
http::GraphQLBatchRequest,
7+
http::{GraphQLBatchRequest, GraphQLRequest},
88
tests::{model::Database, schema::Query},
99
DefaultScalarValue, EmptyMutation, EmptySubscription, RootNode,
1010
};
@@ -38,7 +38,7 @@ async fn graphql(
3838
}
3939

4040
async fn graphql_get(
41-
req: web::Query<GraphQLBatchRequest<DefaultScalarValue>>,
41+
req: web::Query<GraphQLRequest<DefaultScalarValue>>,
4242
schema: web::Data<Schema>,
4343
) -> Result<HttpResponse, Error> {
4444
let context = Database::new();

juniper_actix/examples/actix_subscriptions.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
use actix_cors::Cors;
44
use actix_web::{middleware, web, App, Error, HttpRequest, HttpResponse, HttpServer};
55
use futures::Stream;
6-
use juniper::{http::GraphQLBatchRequest, DefaultScalarValue, EmptyMutation, FieldError, RootNode};
6+
use juniper::{
7+
http::{GraphQLBatchRequest, GraphQLRequest},
8+
DefaultScalarValue, EmptyMutation, FieldError, RootNode,
9+
};
710
use juniper_actix::{
811
get_graphql_handler, graphiql_handler as gqli_handler, playground_handler as play_handler,
912
post_graphql_handler, subscriptions::graphql_subscriptions as sub_handler,
@@ -91,7 +94,7 @@ async fn graphql_subscriptions(
9194
}
9295

9396
async fn graphql_get(
94-
req: web::Query<GraphQLBatchRequest<DefaultScalarValue>>,
97+
req: web::Query<GraphQLRequest<DefaultScalarValue>>,
9598
schema: web::Data<Schema>,
9699
) -> Result<HttpResponse, Error> {
97100
let context = Database::new();

juniper_actix/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ mod tests {
579579
}
580580

581581
async fn index_get(
582-
req: web::Query<GraphQLBatchRequest<DefaultScalarValue>>,
582+
req: web::Query<GraphQLRequest<DefaultScalarValue>>,
583583
schema: web::Data<Schema>,
584584
) -> Result<HttpResponse, Error> {
585585
let context = Database::new();

0 commit comments

Comments
 (0)