aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/models
diff options
context:
space:
mode:
authorMichael Muré <michael.mure@consensys.net>2019-03-31 21:44:14 +0200
committerMichael Muré <batolettre@gmail.com>2019-04-01 14:03:13 +0200
commit15c258cdc4ba37820362a44dfc2636ed1ff92b4c (patch)
tree0790e36bf4846b12b367f12670540eec6ee023f3 /graphql/models
parente028b895aa21553937d732044b7bb0a15c5276f6 (diff)
downloadgit-bug-15c258cdc4ba37820362a44dfc2636ed1ff92b4c.tar.gz
graphql: expose allIdentities, identities and userIdentity in the repo
Diffstat (limited to 'graphql/models')
-rw-r--r--graphql/models/edges.go5
-rw-r--r--graphql/models/gen_models.go13
2 files changed, 18 insertions, 0 deletions
diff --git a/graphql/models/edges.go b/graphql/models/edges.go
index 1dc42583..4bf10fd3 100644
--- a/graphql/models/edges.go
+++ b/graphql/models/edges.go
@@ -19,3 +19,8 @@ func (e CommentEdge) GetCursor() string {
func (e TimelineItemEdge) GetCursor() string {
return e.Cursor
}
+
+// GetCursor return the cursor entry of an edge
+func (e IdentityEdge) GetCursor() string {
+ return e.Cursor
+}
diff --git a/graphql/models/gen_models.go b/graphql/models/gen_models.go
index 71a6b78b..172fe033 100644
--- a/graphql/models/gen_models.go
+++ b/graphql/models/gen_models.go
@@ -8,6 +8,7 @@ import (
"strconv"
"github.com/MichaelMure/git-bug/bug"
+ "github.com/MichaelMure/git-bug/identity"
)
// An object that has an author.
@@ -41,6 +42,18 @@ type CommentEdge struct {
Node bug.Comment `json:"node"`
}
+type IdentityConnection struct {
+ Edges []IdentityEdge `json:"edges"`
+ Nodes []identity.Interface `json:"nodes"`
+ PageInfo PageInfo `json:"pageInfo"`
+ TotalCount int `json:"totalCount"`
+}
+
+type IdentityEdge struct {
+ Cursor string `json:"cursor"`
+ Node identity.Interface `json:"node"`
+}
+
// The connection type for an Operation
type OperationConnection struct {
Edges []OperationEdge `json:"edges"`