mirror of
https://github.com/actix/examples
synced 2025-06-26 09:17:41 +02:00
chore: fmt
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
use actix_cors::Cors;
|
||||
use actix_web::{get, middleware::Logger, route, web, App, HttpServer, Responder};
|
||||
use actix_web::{App, HttpServer, Responder, get, middleware::Logger, route, web};
|
||||
use async_graphql::{
|
||||
http::{playground_source, GraphQLPlaygroundConfig},
|
||||
EmptyMutation, EmptySubscription, Schema,
|
||||
http::{GraphQLPlaygroundConfig, playground_source},
|
||||
};
|
||||
use async_graphql_actix_web::{GraphQLRequest, GraphQLResponse};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use async_graphql::{
|
||||
connection::{query, Connection, Edge},
|
||||
Context, Enum, Error, Interface, Object, OutputType, Result,
|
||||
connection::{Connection, Edge, query},
|
||||
};
|
||||
|
||||
use super::{StarWars, StarWarsChar};
|
||||
|
@ -1,6 +1,6 @@
|
||||
use r2d2_mysql::{
|
||||
mysql::{Opts, OptsBuilder},
|
||||
MySqlConnectionManager,
|
||||
mysql::{Opts, OptsBuilder},
|
||||
};
|
||||
|
||||
pub type Pool = r2d2::Pool<MySqlConnectionManager>;
|
||||
|
@ -1,9 +1,9 @@
|
||||
use actix_web::{get, route, web, Error, HttpResponse, Responder};
|
||||
use juniper::http::{graphiql::graphiql_source, GraphQLRequest};
|
||||
use actix_web::{Error, HttpResponse, Responder, get, route, web};
|
||||
use juniper::http::{GraphQLRequest, graphiql::graphiql_source};
|
||||
|
||||
use crate::{
|
||||
db::Pool,
|
||||
schemas::root::{create_schema, Context, Schema},
|
||||
schemas::root::{Context, Schema, create_schema},
|
||||
};
|
||||
|
||||
/// GraphQL endpoint
|
||||
|
@ -1,5 +1,5 @@
|
||||
use actix_cors::Cors;
|
||||
use actix_web::{middleware::Logger, web::Data, App, HttpServer};
|
||||
use actix_web::{App, HttpServer, middleware::Logger, web::Data};
|
||||
|
||||
mod db;
|
||||
mod handlers;
|
||||
|
@ -1,5 +1,5 @@
|
||||
use juniper::GraphQLInputObject;
|
||||
use mysql::{from_row, params, prelude::*, Error as DBError, Row};
|
||||
use mysql::{Error as DBError, Row, from_row, params, prelude::*};
|
||||
|
||||
use crate::schemas::{root::Context, user::User};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use juniper::{
|
||||
graphql_object, graphql_value, EmptySubscription, FieldError, FieldResult, RootNode,
|
||||
EmptySubscription, FieldError, FieldResult, RootNode, graphql_object, graphql_value,
|
||||
};
|
||||
use mysql::{from_row, params, prelude::*, Error as DBError, Row};
|
||||
use mysql::{Error as DBError, Row, from_row, params, prelude::*};
|
||||
|
||||
use super::{
|
||||
product::{Product, ProductInput},
|
||||
|
@ -1,5 +1,5 @@
|
||||
use juniper::{graphql_object, GraphQLInputObject};
|
||||
use mysql::{from_row, params, prelude::*, Row};
|
||||
use juniper::{GraphQLInputObject, graphql_object};
|
||||
use mysql::{Row, from_row, params, prelude::*};
|
||||
|
||||
use crate::schemas::{product::Product, root::Context};
|
||||
|
||||
|
@ -6,15 +6,14 @@ use std::{io, sync::Arc};
|
||||
|
||||
use actix_cors::Cors;
|
||||
use actix_web::{
|
||||
get, middleware, route,
|
||||
App, HttpResponse, HttpServer, Responder, get, middleware, route,
|
||||
web::{self, Data},
|
||||
App, HttpResponse, HttpServer, Responder,
|
||||
};
|
||||
use juniper::http::{graphiql::graphiql_source, GraphQLRequest};
|
||||
use juniper::http::{GraphQLRequest, graphiql::graphiql_source};
|
||||
|
||||
mod schema;
|
||||
|
||||
use crate::schema::{create_schema, Schema};
|
||||
use crate::schema::{Schema, create_schema};
|
||||
|
||||
/// GraphiQL playground UI
|
||||
#[get("/graphiql")]
|
||||
|
Reference in New Issue
Block a user