aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/connections/gen_comment.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-08-13 15:28:16 +0200
committerMichael Muré <batolettre@gmail.com>2018-08-13 15:28:47 +0200
commitdf144e727a858ed07e3c9328d91efe052c4781e1 (patch)
treebfbfeea70f97ab3d4274c8e5add2c3aeeac1423b /graphql/connections/gen_comment.go
parentf2f779c5a8b4efe67317bbffe110a9880c1f529a (diff)
downloadgit-bug-df144e727a858ed07e3c9328d91efe052c4781e1.tar.gz
fix some linting trouble
Diffstat (limited to 'graphql/connections/gen_comment.go')
-rw-r--r--graphql/connections/gen_comment.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/graphql/connections/gen_comment.go b/graphql/connections/gen_comment.go
index 0253e831..57fad3af 100644
--- a/graphql/connections/gen_comment.go
+++ b/graphql/connections/gen_comment.go
@@ -11,14 +11,18 @@ import (
"github.com/MichaelMure/git-bug/graphql/models"
)
+// BugCommentEdger define a function that take a bug.Comment and an offset and
+// create an Edge.
type BugCommentEdger func(value bug.Comment, offset int) Edge
+// BugCommentConMaker define a function that create a models.CommentConnection
type BugCommentConMaker func(
edges []models.CommentEdge,
nodes []bug.Comment,
info models.PageInfo,
totalCount int) (models.CommentConnection, error)
+// BugCommentCon will paginate a source according to the input of a relay connection
func BugCommentCon(source []bug.Comment, edger BugCommentEdger, conMaker BugCommentConMaker, input models.ConnectionInput) (models.CommentConnection, error) {
var nodes []bug.Comment
var edges []models.CommentEdge