diff options
Diffstat (limited to 'graphql/schema.graphql')
-rw-r--r-- | graphql/schema.graphql | 49 |
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 |