Skip to content

upgrade examples to actix-web v4.0 beta.10 #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions actix-web/error-extensions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
async-graphql = { path = "../../.." }
async-graphql-actix-web = { path = "../../../integrations/actix-web" }
actix-web = "3.0.0"
actix-rt = "1.1.0"
actix-web = "4.0.0-beta.10"
actix-rt = "2.2.0"
thiserror = "1.0"
serde_json = "1.0"
4 changes: 2 additions & 2 deletions actix-web/error-extensions/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[macro_use]
extern crate thiserror;

use actix_web::{guard, web, App, HttpResponse, HttpServer};
use actix_web::{guard, web, web::Data, App, HttpResponse, HttpServer};
use async_graphql::http::{playground_source, GraphQLPlaygroundConfig};
use async_graphql::{
EmptyMutation, EmptySubscription, ErrorExtensions, FieldError, FieldResult, Object, ResultExt,
Expand Down Expand Up @@ -111,7 +111,7 @@ async fn main() -> std::io::Result<()> {

HttpServer::new(move || {
App::new()
.data(Schema::new(QueryRoot, EmptyMutation, EmptySubscription))
.app_data(Data::new(Schema::new(QueryRoot, EmptyMutation, EmptySubscription)))
.service(web::resource("/").guard(guard::Post()).to(index))
.service(web::resource("/").guard(guard::Get()).to(gql_playgound))
})
Expand Down
4 changes: 2 additions & 2 deletions actix-web/starwars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2018"
[dependencies]
async-graphql = { path = "../../.." }
async-graphql-actix-web = { path = "../../../integrations/actix-web" }
actix-web = "3.0.0"
actix-rt = "1.1.0"
actix-web = "4.0.0-beta.10"
actix-rt = "2.2.0"
starwars = { path = "../../models/starwars" }
2 changes: 1 addition & 1 deletion actix-web/starwars/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async fn main() -> std::io::Result<()> {

HttpServer::new(move || {
App::new()
.data(schema.clone())
.app_data(web::Data::new(schema.clone()))
.service(web::resource("/").guard(guard::Post()).to(index))
.service(web::resource("/").guard(guard::Get()).to(index_playground))
})
Expand Down
6 changes: 3 additions & 3 deletions actix-web/subscription/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
async-graphql = { path = "../../.." }
async-graphql-actix-web = { path = "../../../integrations/actix-web" }
actix-web = "3.0.0"
actix-rt = "1.1.0"
actix-web-actors = "3.0.0"
actix-web = "4.0.0-beta.10"
actix-rt = "2.2.0"
actix-web-actors = "4.0.0-beta.7"
books = { path = "../../models/books" }
2 changes: 1 addition & 1 deletion actix-web/subscription/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async fn main() -> std::io::Result<()> {

HttpServer::new(move || {
App::new()
.data(schema.clone())
.app_data(web::Data::new(schema.clone()))
.service(web::resource("/").guard(guard::Post()).to(index))
.service(
web::resource("/")
Expand Down
6 changes: 3 additions & 3 deletions actix-web/token-from-header/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ edition = "2018"
[dependencies]
async-graphql = { path = "../../.." }
async-graphql-actix-web = { path = "../../../integrations/actix-web" }
actix-web = "3.0.0"
actix-rt = "1.1.0"
actix-web = "4.0.0-beta.10"
actix-rt = "2.2.0"
futures = "0.3"
actix-web-actors = "3.0.0"
actix-web-actors = "4.0.0-beta.7"
serde_json = "1.0"
serde_derive = "1.0"
serde = "1.0"
2 changes: 1 addition & 1 deletion actix-web/token-from-header/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async fn main() -> std::io::Result<()> {

HttpServer::new(move || {
App::new()
.data(schema.clone())
.app_data(web::Data::new(schema.clone()))
.service(web::resource("/").guard(guard::Post()).to(index))
.service(
web::resource("/")
Expand Down
4 changes: 2 additions & 2 deletions actix-web/upload/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2018"
[dependencies]
async-graphql = { path = "../../.." }
async-graphql-actix-web = { path = "../../../integrations/actix-web" }
actix-web = "3.0.0"
actix-rt = "1.1.0"
actix-web = "4.0.0-beta.10"
actix-rt = "2.2.0"
files = { path = "../../models/files" }
2 changes: 1 addition & 1 deletion actix-web/upload/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async fn main() -> std::io::Result<()> {

HttpServer::new(move || {
App::new()
.data(schema.clone())
.app_data(web::Data::new(schema.clone()))
.service(
web::resource("/")
.guard(guard::Post())
Expand Down