List query on GraphQL side too

That was very simple.
This commit is contained in:
Alex Wright 2021-07-11 16:12:06 +00:00
parent 56df8ebf3d
commit ca6bc8d7d1
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,10 @@ impl Query {
fn personById(database: &Database, id: String) -> Option<Person> { fn personById(database: &Database, id: String) -> Option<Person> {
database.get_person(&id) database.get_person(&id)
} }
fn people(database: &Database) -> Vec<Person> {
database.list_people()
}
} }
pub struct Mutations; pub struct Mutations;