aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/models
diff options
context:
space:
mode:
Diffstat (limited to 'graphql/models')
-rw-r--r--graphql/models/gen_models.go34
1 files changed, 24 insertions, 10 deletions
diff --git a/graphql/models/gen_models.go b/graphql/models/gen_models.go
index 172fe033..64997104 100644
--- a/graphql/models/gen_models.go
+++ b/graphql/models/gen_models.go
@@ -18,16 +18,21 @@ type Authored interface {
// The connection type for Bug.
type BugConnection struct {
- Edges []BugEdge `json:"edges"`
- Nodes []bug.Snapshot `json:"nodes"`
- PageInfo PageInfo `json:"pageInfo"`
- TotalCount int `json:"totalCount"`
+ // A list of edges.
+ Edges []BugEdge `json:"edges"`
+ Nodes []bug.Snapshot `json:"nodes"`
+ // Information to aid in pagination.
+ PageInfo PageInfo `json:"pageInfo"`
+ // Identifies the total count of items in the connection.
+ TotalCount int `json:"totalCount"`
}
// An edge in a connection.
type BugEdge struct {
- Cursor string `json:"cursor"`
- Node bug.Snapshot `json:"node"`
+ // A cursor for use in pagination.
+ Cursor string `json:"cursor"`
+ // The item at the end of the edge.
+ Node bug.Snapshot `json:"node"`
}
type CommentConnection struct {
@@ -70,10 +75,14 @@ type OperationEdge struct {
// Information about pagination in a connection.
type PageInfo struct {
- HasNextPage bool `json:"hasNextPage"`
- HasPreviousPage bool `json:"hasPreviousPage"`
- StartCursor string `json:"startCursor"`
- EndCursor string `json:"endCursor"`
+ // When paginating forwards, are there more items?
+ HasNextPage bool `json:"hasNextPage"`
+ // When paginating backwards, are there more items?
+ HasPreviousPage bool `json:"hasPreviousPage"`
+ // When paginating backwards, the cursor to continue.
+ StartCursor string `json:"startCursor"`
+ // When paginating forwards, the cursor to continue.
+ EndCursor string `json:"endCursor"`
}
// The connection type for TimelineItem
@@ -97,6 +106,11 @@ const (
StatusClosed Status = "CLOSED"
)
+var AllStatus = []Status{
+ StatusOpen,
+ StatusClosed,
+}
+
func (e Status) IsValid() bool {
switch e {
case StatusOpen, StatusClosed: