aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/models
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-09-04 21:04:05 +0200
committerMichael Muré <batolettre@gmail.com>2019-09-04 21:04:05 +0200
commit7df170939f2bad0f03b834dda5af1b55bd0d6830 (patch)
tree923011eb7e421c44cb6bcec4f1f5806066c51264 /graphql/models
parent16af70894c0348ec90dfee69274f7d44ef2eb079 (diff)
downloadgit-bug-7df170939f2bad0f03b834dda5af1b55bd0d6830.tar.gz
graphql: make repository.validLabels a connection
Diffstat (limited to 'graphql/models')
-rw-r--r--graphql/models/edges.go5
-rw-r--r--graphql/models/gen_models.go12
2 files changed, 17 insertions, 0 deletions
diff --git a/graphql/models/edges.go b/graphql/models/edges.go
index 4bf10fd3..6a331e3e 100644
--- a/graphql/models/edges.go
+++ b/graphql/models/edges.go
@@ -24,3 +24,8 @@ func (e TimelineItemEdge) GetCursor() string {
func (e IdentityEdge) GetCursor() string {
return e.Cursor
}
+
+// GetCursor return the cursor entry of an edge
+func (e LabelEdge) GetCursor() string {
+ return e.Cursor
+}
diff --git a/graphql/models/gen_models.go b/graphql/models/gen_models.go
index 3c142e24..5498960b 100644
--- a/graphql/models/gen_models.go
+++ b/graphql/models/gen_models.go
@@ -156,6 +156,18 @@ type IdentityEdge struct {
Node identity.Interface `json:"node"`
}
+type LabelConnection struct {
+ Edges []*LabelEdge `json:"edges"`
+ Nodes []bug.Label `json:"nodes"`
+ PageInfo *PageInfo `json:"pageInfo"`
+ TotalCount int `json:"totalCount"`
+}
+
+type LabelEdge struct {
+ Cursor string `json:"cursor"`
+ Node bug.Label `json:"node"`
+}
+
type NewBugInput struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId"`