From df144e727a858ed07e3c9328d91efe052c4781e1 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Mon, 13 Aug 2018 15:28:16 +0200 Subject: fix some linting trouble --- graphql/connections/connection_template.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'graphql/connections/connection_template.go') diff --git a/graphql/connections/connection_template.go b/graphql/connections/connection_template.go index a4608430..511f48d3 100644 --- a/graphql/connections/connection_template.go +++ b/graphql/connections/connection_template.go @@ -2,22 +2,32 @@ package connections import ( "fmt" + "github.com/MichaelMure/git-bug/graphql/models" "github.com/cheekybits/genny/generic" ) +// NodeType define the node type handled by this relay connection type NodeType generic.Type + +// EdgeType define the edge type handled by this relay connection type EdgeType generic.Type + +// ConnectionType define the connection type handled by this relay connection type ConnectionType generic.Type +// NodeTypeEdger define a function that take a NodeType and an offset and +// create an Edge. type NodeTypeEdger func(value NodeType, offset int) Edge +// NodeTypeConMaker define a function that create a ConnectionType type NodeTypeConMaker func( edges []EdgeType, nodes []NodeType, info models.PageInfo, totalCount int) (ConnectionType, error) +// NodeTypeCon will paginate a source according to the input of a relay connection func NodeTypeCon(source []NodeType, edger NodeTypeEdger, conMaker NodeTypeConMaker, input models.ConnectionInput) (ConnectionType, error) { var nodes []NodeType var edges []EdgeType -- cgit