aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/timeline.graphql
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-12-23 17:55:41 +0100
committerMichael Muré <batolettre@gmail.com>2018-12-23 17:55:41 +0100
commit0d5bd6b18afde898e610746657a87080235f6222 (patch)
treebe714ae264bcda3aff003c4e4080687e628aeec3 /graphql/timeline.graphql
parent1410a1af75b1ab9ea3f980a7e372728f9a123abf (diff)
downloadgit-bug-0d5bd6b18afde898e610746657a87080235f6222.tar.gz
graphql: now that it's possible, split the schema for clarity
Diffstat (limited to 'graphql/timeline.graphql')
-rw-r--r--graphql/timeline.graphql84
1 files changed, 84 insertions, 0 deletions
diff --git a/graphql/timeline.graphql b/graphql/timeline.graphql
new file mode 100644
index 00000000..7cce87a7
--- /dev/null
+++ b/graphql/timeline.graphql
@@ -0,0 +1,84 @@
+"""An item in the timeline of events"""
+interface TimelineItem {
+ """The hash of the source operation"""
+ hash: Hash!
+}
+
+"""CommentHistoryStep hold one version of a message in the history"""
+type CommentHistoryStep {
+ message: String!
+ date: Time!
+}
+
+# Connection
+
+"""The connection type for TimelineItem"""
+type TimelineItemConnection {
+ edges: [TimelineItemEdge!]!
+ nodes: [TimelineItem!]!
+ pageInfo: PageInfo!
+ totalCount: Int!
+}
+
+"""Represent a TimelineItem"""
+type TimelineItemEdge {
+ cursor: String!
+ node: TimelineItem!
+}
+
+# Items
+
+"""CreateTimelineItem is a TimelineItem that represent the creation of a bug and its message edition history"""
+type CreateTimelineItem implements TimelineItem {
+ """The hash of the source operation"""
+ hash: Hash!
+ author: Person!
+ message: String!
+ files: [Hash!]!
+ createdAt: Time!
+ lastEdit: Time!
+ edited: Boolean!
+ history: [CommentHistoryStep!]!
+}
+
+"""AddCommentTimelineItem is a TimelineItem that represent a Comment and its edition history"""
+type AddCommentTimelineItem implements TimelineItem {
+ """The hash of the source operation"""
+ hash: Hash!
+ author: Person!
+ message: String!
+ files: [Hash!]!
+ createdAt: Time!
+ lastEdit: Time!
+ edited: Boolean!
+ history: [CommentHistoryStep!]!
+}
+
+"""LabelChangeTimelineItem is a TimelineItem that represent a change in the labels of a bug"""
+type LabelChangeTimelineItem implements TimelineItem {
+ """The hash of the source operation"""
+ hash: Hash!
+ author: Person!
+ date: Time!
+ added: [Label!]!
+ removed: [Label!]!
+}
+
+"""SetStatusTimelineItem is a TimelineItem that represent a change in the status of a bug"""
+type SetStatusTimelineItem implements TimelineItem {
+ """The hash of the source operation"""
+ hash: Hash!
+ author: Person!
+ date: Time!
+ status: Status!
+}
+
+"""LabelChangeTimelineItem is a TimelineItem that represent a change in the title of a bug"""
+type SetTitleTimelineItem implements TimelineItem {
+ """The hash of the source operation"""
+ hash: Hash!
+ author: Person!
+ date: Time!
+ title: String!
+ was: String!
+} \ No newline at end of file