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:
@ -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"
|
||||
|
||||
|
@ -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))
|
||||
|
Reference in New Issue
Block a user