Improve TimeInterval type
This commit is contained in:
@@ -107,26 +107,22 @@ Date with time (isoformat)
|
||||
"""
|
||||
scalar DateTime
|
||||
|
||||
input TimeInterval {
|
||||
"""
|
||||
A second is the base unit and cannot be subdivided
|
||||
"""
|
||||
seconds: Int = 0
|
||||
minutes: Int = 0
|
||||
hours: Int = 0
|
||||
input TimeInterval @oneOf {
|
||||
timedelta: TimeDeltaGQL
|
||||
aligned: AlignedIntervalEnum
|
||||
}
|
||||
|
||||
input TimeDeltaGQL {
|
||||
days: Int = 0
|
||||
weeks: Int = 0
|
||||
months: Int = 0
|
||||
|
||||
"""
|
||||
Assumes a year is 365 days long
|
||||
"""
|
||||
years: Int = 0
|
||||
}
|
||||
|
||||
"""
|
||||
True eg 1/15-3/15 => [(1/15,1/31), (2/1,2/28), (3/1,3/15)] False eg 1/15-2/15 => [(1/15,2/14), (2/14,3/15)]
|
||||
"""
|
||||
calendarAlignedMonths: Boolean! = true
|
||||
enum AlignedIntervalEnum {
|
||||
MONTH
|
||||
YEAR
|
||||
WEEK
|
||||
}
|
||||
|
||||
input FilterInput @oneOf {
|
||||
|
Reference in New Issue
Block a user