【发布时间】:2020-08-04 21:02:08
【问题描述】:
我有一个对象“业务”,我正在尝试在GraphQL 中对其进行模式化。由于 Graphql 上默认不提供 DateTime 和 Time,因此我遇到了以下库:github。
Business.graphql:
type Business {
businessId: ID!
name: String!
createdAt: Date!
closeHour: Time
}
不幸的是,该库仅提供一个 DateTime。如何仅将“时间”(即 15:00 或 09:45)用于 closeHour 属性?有没有其他图书馆可以提供帮助?
【问题讨论】:
标签: graphql graphql-js graphql-schema