This commit is contained in:
Sunli 2020-06-10 10:21:15 +08:00
commit 78c1bd2652
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "async-graphql" name = "async-graphql"
version = "1.15.1" version = "1.15.2"
authors = ["sunli <scott_s829@163.com>"] authors = ["sunli <scott_s829@163.com>"]
edition = "2018" edition = "2018"
description = "A GraphQL server library implemented in Rust" description = "A GraphQL server library implemented in Rust"

View File

@ -5,7 +5,7 @@ use chrono::{DateTime, TimeZone, Utc};
/// Implement the DateTime<Utc> scalar /// Implement the DateTime<Utc> scalar
/// ///
/// The input/output is a string in RFC3339 format. /// The input/output is a string in RFC3339 format.
#[Scalar(internal, name = "DateTime")] #[Scalar(internal, name = "DateTimeUtc")]
impl ScalarType for DateTime<Utc> { impl ScalarType for DateTime<Utc> {
fn parse(value: Value) -> InputValueResult<Self> { fn parse(value: Value) -> InputValueResult<Self> {
match value { match value {

View File

@ -55,10 +55,10 @@ mod tests {
assert_eq!(<NaiveTime as Type>::type_name(), "NaiveTime"); assert_eq!(<NaiveTime as Type>::type_name(), "NaiveTime");
assert_eq!(<NaiveTime as Type>::qualified_type_name(), "NaiveTime!"); assert_eq!(<NaiveTime as Type>::qualified_type_name(), "NaiveTime!");
assert_eq!(<DateTime::<Utc> as Type>::type_name(), "DateTime"); assert_eq!(<DateTime::<Utc> as Type>::type_name(), "DateTimeUtc");
assert_eq!( assert_eq!(
<DateTime::<Utc> as Type>::qualified_type_name(), <DateTime::<Utc> as Type>::qualified_type_name(),
"DateTime!" "DateTimeUtc!"
); );
assert_eq!(<Uuid as Type>::type_name(), "UUID"); assert_eq!(<Uuid as Type>::type_name(), "UUID");