blob: ed83a9f391a53be481276429a01d0aa3478a3988 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
use crate::graphql::types::user;
use async_graphql::{Context, Object};
pub struct Query;
#[Object]
impl Query {
async fn api_version(&self) -> &'static str {
"1.0"
}
/// Returns all the users
async fn users<'ctx>(&self, ctx: &Context<'ctx>) -> Result<Option<Vec<user::User>>, String> {
user::get_users(ctx).await
}
}
|