mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
upgrade example to actix-web 0.7
This commit is contained in:
@ -6,8 +6,10 @@ workspace = "../"
|
||||
|
||||
[dependencies]
|
||||
env_logger = "0.5"
|
||||
actix = "0.5"
|
||||
actix-web = "^0.6"
|
||||
|
||||
actix = "0.7"
|
||||
#actix-web = "^0.7"
|
||||
actix-web = { git = "https://github.com/actix/actix-web.git" }
|
||||
|
||||
futures = "0.1"
|
||||
serde = "1.0"
|
||||
|
@ -27,7 +27,7 @@ use schema::create_schema;
|
||||
use schema::Schema;
|
||||
|
||||
struct AppState {
|
||||
executor: Addr<Syn, GraphQLExecutor>,
|
||||
executor: Addr<GraphQLExecutor>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
@ -61,7 +61,7 @@ impl Handler<GraphQLData> for GraphQLExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
fn graphiql(_req: HttpRequest<AppState>) -> Result<HttpResponse, Error> {
|
||||
fn graphiql(_req: &HttpRequest<AppState>) -> Result<HttpResponse, Error> {
|
||||
let html = graphiql_source("http://127.0.0.1:8080/graphql");
|
||||
Ok(HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
|
Reference in New Issue
Block a user