Skip to content

Commit 8aaf9c7

Browse files
committed
types(notifications): improve notifications graphql schemas
1 parent a89de19 commit 8aaf9c7

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

src/typeDefs/projectNotifications.ts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,31 @@ export default gql`
1616
SEEN_MORE
1717
}
1818
19+
"""
20+
Allowed threshold periods in milliseconds
21+
"""
22+
enum ThresholdPeriod {
23+
"""
24+
One minute in milliseconds
25+
"""
26+
MINUTE = 60000
27+
28+
"""
29+
One hour in milliseconds
30+
"""
31+
HOUR = 3600000
32+
33+
"""
34+
One day in milliseconds
35+
"""
36+
DAY = 86400000
37+
38+
"""
39+
One week in milliseconds
40+
"""
41+
WEEK = 604800000
42+
}
43+
1944
"""
2045
Project notify settings
2146
"""
@@ -58,6 +83,6 @@ export default gql`
5883
"""
5984
Period to receive notification
6085
"""
61-
thresholdPeriod: Int
86+
thresholdPeriod: ThresholdPeriod
6287
}
6388
`;

src/typeDefs/projectNotificationsMutations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default gql`
4343
"""
4444
Period to receive notification
4545
"""
46-
thresholdPeriod: Int
46+
thresholdPeriod: ThresholdPeriod
4747
}
4848
4949
"""
@@ -93,7 +93,7 @@ export default gql`
9393
"""
9494
Period to receive notification
9595
"""
96-
thresholdPeriod: Int
96+
thresholdPeriod: ThresholdPeriod
9797
}
9898
9999
"""

0 commit comments

Comments
 (0)