时间类型

这是 GraphQL 库版本 7 的文档。对于长期支持 (LTS) 版本 5,请参阅 GraphQL 库版本 5 LTS

类型 描述 示例

DateTime

ISO 日期时间字符串,存储为 日期时间 时间类型。

type User @node {
    createdAt: DateTime
}

Date

"YYYY-MM-DD" 日期字符串,存储为 日期 时间类型。

type Movie @node {
    releaseDate: Date
}

Duration

ISO 8601 持续时间字符串,存储为 持续时间 类型。

目前 [YMWD] 不接受小数数值。比较根据 Cypher 开发者指南 进行。

type Movie @node {
    runningTime: Duration!
}

LocalDateTime

"YYYY-MM-DDTHH:MM:SS" 日期时间字符串,存储为 LocalDateTime 时间类型。

type Movie @node {
    nextShowing: LocalDateTime
}

Time

RFC3339 时间字符串,存储为 时间 时间类型。

type Movie @node {
    nextShowing: Time
}

LocalTime

"HH:MM:SS[.sss+]" 时间字符串,存储为 LocalTime 时间类型。

type Movie @node {
    nextShowing: LocalTime
}
© . All rights reserved.