From ca6bc8d7d1c49fd8d75e22d9bef8d4622e11776e Mon Sep 17 00:00:00 2001 From: Alex Wright Date: Sun, 11 Jul 2021 16:12:06 +0000 Subject: [PATCH] List query on GraphQL side too That was very simple. --- src/schema.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/schema.rs b/src/schema.rs index e2e02c7..455f709 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -21,6 +21,10 @@ impl Query { fn personById(database: &Database, id: String) -> Option { database.get_person(&id) } + + fn people(database: &Database) -> Vec { + database.list_people() + } } pub struct Mutations;