aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/schema.graphql
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-29 20:58:25 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-29 20:59:25 +0200
commit36ebbe0cf4078070c3a6710f2e1f781c03de3d1a (patch)
tree1c739320485c55d2b68e766d6f15609c86a0eefe /graphql/schema.graphql
parentc46d01f8c10e6363b680fa6876e91bd8eaf3bb3e (diff)
downloadgit-bug-36ebbe0cf4078070c3a6710f2e1f781c03de3d1a.tar.gz
graphql: expose the new Timeline
Diffstat (limited to 'graphql/schema.graphql')
-rw-r--r--graphql/schema.graphql49
1 files changed, 46 insertions, 3 deletions
diff --git a/graphql/schema.graphql b/graphql/schema.graphql
index c083ac4f..2e685779 100644
--- a/graphql/schema.graphql
+++ b/graphql/schema.graphql
@@ -73,6 +73,11 @@ type OperationEdge {
node: Operation!
}
+"""An item in the timeline of events"""
+interface TimelineItem {
+ hash: Hash!
+}
+
"""An operation applied to a bug."""
interface Operation {
"""The operations author."""
@@ -90,7 +95,8 @@ type CreateOperation implements Operation & Authored {
files: [Hash!]!
}
-type SetTitleOperation implements Operation & Authored {
+type SetTitleOperation implements Operation & Authored & TimelineItem {
+ hash: Hash!
author: Person!
date: Time!
@@ -106,14 +112,16 @@ type AddCommentOperation implements Operation & Authored {
files: [Hash!]!
}
-type SetStatusOperation implements Operation & Authored {
+type SetStatusOperation implements Operation & Authored & TimelineItem {
+ hash: Hash!
author: Person!
date: Time!
status: Status!
}
-type LabelChangeOperation implements Operation & Authored {
+type LabelChangeOperation implements Operation & Authored & TimelineItem {
+ hash: Hash!
author: Person!
date: Time!
@@ -121,6 +129,30 @@ type LabelChangeOperation implements Operation & Authored {
removed: [Label!]!
}
+type TimelineItemConnection {
+ edges: [TimelineItemEdge!]!
+ nodes: [TimelineItem!]!
+ pageInfo: PageInfo!
+ totalCount: Int!
+}
+
+type TimelineItemEdge {
+ cursor: String!
+ node: TimelineItem!
+}
+
+type CreateTimelineItem implements TimelineItem {
+ hash: Hash!
+ lastState: Comment!
+ history: [Comment!]!
+}
+
+type CommentTimelineItem implements TimelineItem {
+ hash: Hash!
+ lastState: Comment!
+ history: [Comment!]!
+}
+
"""The connection type for Bug."""
type BugConnection {
"""A list of edges."""
@@ -161,6 +193,17 @@ type Bug {
last: Int
): CommentConnection!
+ timeline(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): TimelineItemConnection!
+
operations(
"""Returns the elements in the list that come after the specified cursor."""
after: String