Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed Jul 19, 2024
1 parent 71d82af commit 0b213ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/grpc/routeguide/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl RouteGuide for RouteGuideService {
while let Some(note) = stream.next().await {
let note = note?;

let location = note.location.clone().unwrap();
let location = note.location.unwrap();

let location_notes = notes.entry(location).or_insert(vec![]);
location_notes.push(note);
Expand Down
2 changes: 1 addition & 1 deletion examples/poem/async-graphql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ publish.workspace = true
[dependencies]
poem.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
async-graphql = "5.0.10"
async-graphql = "7.0.7"
slab = "0.4.4"
tracing-subscriber.workspace = true
9 changes: 5 additions & 4 deletions examples/poem/async-graphql/src/starwars/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,12 @@ impl QueryRoot {
}

#[derive(Interface)]
#[allow(clippy::duplicated_attributes)]
#[graphql(
field(name = "id", type = "&str"),
field(name = "name", type = "&str"),
field(name = "friends", type = "Vec<Character<'ctx>>"),
field(name = "appears_in", type = "&[Episode]")
field(name = "id", ty = "&str"),
field(name = "name", ty = "&str"),
field(name = "friends", ty = "Vec<Character<'ctx>>"),
field(name = "appears_in", ty = "&[Episode]")
)]
pub enum Character<'a> {
Human(Human<'a>),
Expand Down

0 comments on commit 0b213ae

Please sign in to comment.