diff options
author | Michael Muré <batolettre@gmail.com> | 2019-08-12 16:12:14 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-08-12 16:12:14 +0200 |
commit | 99b5c58d43137bd9f6503788a55484327b0c531f (patch) | |
tree | 08ecc0f923b5f1fb4e8a7627aeabccb335d92ad1 /graphql/connections/gen_lazy_bug.go | |
parent | 67a3752e176790e82a48706236f889cab4f8913d (diff) | |
download | git-bug-99b5c58d43137bd9f6503788a55484327b0c531f.tar.gz |
finish the refactoring for the dedicated identifier type
Diffstat (limited to 'graphql/connections/gen_lazy_bug.go')
-rw-r--r-- | graphql/connections/gen_lazy_bug.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/graphql/connections/gen_lazy_bug.go b/graphql/connections/gen_lazy_bug.go index 6c9eb012..9638e86b 100644 --- a/graphql/connections/gen_lazy_bug.go +++ b/graphql/connections/gen_lazy_bug.go @@ -7,23 +7,24 @@ package connections import ( "fmt" + "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/graphql/models" ) -// StringEdgeMaker define a function that take a string and an offset and +// EntityIdEdgeMaker define a function that take a entity.Id and an offset and // create an Edge. -type LazyBugEdgeMaker func(value string, offset int) Edge +type LazyBugEdgeMaker func(value entity.Id, offset int) Edge // LazyBugConMaker define a function that create a models.BugConnection type LazyBugConMaker func( edges []*LazyBugEdge, - nodes []string, + nodes []entity.Id, info *models.PageInfo, totalCount int) (*models.BugConnection, error) // LazyBugCon will paginate a source according to the input of a relay connection -func LazyBugCon(source []string, edgeMaker LazyBugEdgeMaker, conMaker LazyBugConMaker, input models.ConnectionInput) (*models.BugConnection, error) { - var nodes []string +func LazyBugCon(source []entity.Id, edgeMaker LazyBugEdgeMaker, conMaker LazyBugConMaker, input models.ConnectionInput) (*models.BugConnection, error) { + var nodes []entity.Id var edges []*LazyBugEdge var cursors []string var pageInfo = &models.PageInfo{} |