mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
Update to master (#90)
This commit is contained in:
@ -6,7 +6,7 @@ workspace = ".."
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-web = { git="https://github.com/actix/actix-web.git", branch = "1.0" }
|
||||
actix-web = { git="https://github.com/actix/actix-web.git" }
|
||||
env_logger = "0.6"
|
||||
futures = "0.1"
|
||||
serde = "1.0"
|
||||
|
@ -49,8 +49,8 @@ fn main() -> io::Result<()> {
|
||||
// Start http server
|
||||
HttpServer::new(move || {
|
||||
App::new()
|
||||
.state(schema.clone())
|
||||
.middleware(middleware::Logger::default())
|
||||
.data(schema.clone())
|
||||
.wrap(middleware::Logger::default())
|
||||
.service(web::resource("/graphql").route(web::post().to_async(graphql)))
|
||||
.service(web::resource("/graphiql").route(web::get().to(graphiql)))
|
||||
})
|
||||
|
Reference in New Issue
Block a user