zero4rs 2.0.0

zero4rs is a powerful, pragmatic, and extremely fast web framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use async_graphql::FieldResult;
use async_graphql::Object;

#[derive(Default)]
pub struct QueryDateTime;

#[Object(extends)]
impl QueryDateTime {
    /// 返回当前系统时间(UTC)
    async fn current_date_time(&self) -> FieldResult<String> {
        Ok(crate::commons::date_string())
    }
}