1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

update actix web to stable version

This commit is contained in:
Rob Ede
2022-02-25 21:07:22 +00:00
parent c3a74c6823
commit 4dc9199781
61 changed files with 144 additions and 150 deletions

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021"
[dependencies]
actix-web = "4.0.0-rc.3"
actix-web = "4"
actix-web-lab = "0.10"
actix-cors = "0.6.0-beta.10"

View File

@ -121,12 +121,8 @@ impl QueryRoot {
first: Option<i32>,
last: Option<i32>,
) -> FieldResult<Connection<usize, Human, EmptyFields, EmptyFields>> {
let humans = ctx
.data_unchecked::<StarWars>()
.humans()
.iter()
.copied()
.collect::<Vec<_>>();
let humans = ctx.data_unchecked::<StarWars>().humans().to_vec();
query_characters(after, before, first, last, &humans)
.await
.map(|conn| conn.map_node(Human))
@ -148,12 +144,8 @@ impl QueryRoot {
first: Option<i32>,
last: Option<i32>,
) -> FieldResult<Connection<usize, Droid, EmptyFields, EmptyFields>> {
let droids = ctx
.data_unchecked::<StarWars>()
.droids()
.iter()
.copied()
.collect::<Vec<_>>();
let droids = ctx.data_unchecked::<StarWars>().droids().to_vec();
query_characters(after, before, first, last, &droids)
.await
.map(|conn| conn.map_node(Droid))

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021"
[dependencies]
actix-web = "4.0.0-rc.3"
actix-web = "4"
actix-web-lab = "0.10"
actix-cors = "0.6.0-beta.10"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021"
[dependencies]
actix-web = "4.0.0-rc.3"
actix-web = "4"
actix-web-lab = "0.10"
actix-cors = "0.6.0-beta.10"