aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/connections
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-05-15 18:20:54 +0200
committerGitHub <noreply@github.com>2019-05-15 18:20:54 +0200
commit22f435bd2a8fc35bde96eafb50b3f78650a5983b (patch)
tree629b72f3d95ac7b7806fb83096a3b89e14f745ef /graphql/connections
parent97476ff5fadaf0a457d0f0133db58415b6075940 (diff)
parent8bab279114f06f10e22435b0caf9002201831555 (diff)
downloadgit-bug-22f435bd2a8fc35bde96eafb50b3f78650a5983b.tar.gz
Merge pull request #134 from A-Hilaly/gqlgen
Upgrade gqlgen version to v0.9.0
Diffstat (limited to 'graphql/connections')
-rw-r--r--graphql/connections/connection_template.go16
-rw-r--r--graphql/connections/gen_comment.go16
-rw-r--r--graphql/connections/gen_identity.go16
-rw-r--r--graphql/connections/gen_lazy_bug.go16
-rw-r--r--graphql/connections/gen_lazy_identity.go16
-rw-r--r--graphql/connections/gen_operation.go16
-rw-r--r--graphql/connections/gen_timeline.go16
7 files changed, 63 insertions, 49 deletions
diff --git a/graphql/connections/connection_template.go b/graphql/connections/connection_template.go
index 4370957c..f276b2d0 100644
--- a/graphql/connections/connection_template.go
+++ b/graphql/connections/connection_template.go
@@ -26,17 +26,17 @@ type NameEdgeMaker func(value NodeType, offset int) Edge
// NameConMaker define a function that create a ConnectionType
type NameConMaker func(
- edges []EdgeType,
+ edges []*EdgeType,
nodes []NodeType,
- info models.PageInfo,
+ info *models.PageInfo,
totalCount int) (*ConnectionType, error)
// NameCon will paginate a source according to the input of a relay connection
func NameCon(source []NodeType, edgeMaker NameEdgeMaker, conMaker NameConMaker, input models.ConnectionInput) (*ConnectionType, error) {
var nodes []NodeType
- var edges []EdgeType
+ var edges []*EdgeType
var cursors []string
- var pageInfo models.PageInfo
+ var pageInfo = &models.PageInfo{}
var totalCount = len(source)
emptyCon, _ := conMaker(edges, nodes, pageInfo, 0)
@@ -66,18 +66,20 @@ func NameCon(source []NodeType, edgeMaker NameEdgeMaker, conMaker NameConMaker,
break
}
- edges = append(edges, edge.(EdgeType))
+ e := edge.(EdgeType)
+ edges = append(edges, &e)
cursors = append(cursors, edge.GetCursor())
nodes = append(nodes, value)
}
} else {
- edges = make([]EdgeType, len(source))
+ edges = make([]*EdgeType, len(source))
cursors = make([]string, len(source))
nodes = source
for i, value := range source {
edge := edgeMaker(value, i+offset)
- edges[i] = edge.(EdgeType)
+ e := edge.(EdgeType)
+ edges[i] = &e
cursors[i] = edge.GetCursor()
}
}
diff --git a/graphql/connections/gen_comment.go b/graphql/connections/gen_comment.go
index 021320c6..9f96f2bb 100644
--- a/graphql/connections/gen_comment.go
+++ b/graphql/connections/gen_comment.go
@@ -17,17 +17,17 @@ type CommentEdgeMaker func(value bug.Comment, offset int) Edge
// CommentConMaker define a function that create a models.CommentConnection
type CommentConMaker func(
- edges []models.CommentEdge,
+ edges []*models.CommentEdge,
nodes []bug.Comment,
- info models.PageInfo,
+ info *models.PageInfo,
totalCount int) (*models.CommentConnection, error)
// CommentCon will paginate a source according to the input of a relay connection
func CommentCon(source []bug.Comment, edgeMaker CommentEdgeMaker, conMaker CommentConMaker, input models.ConnectionInput) (*models.CommentConnection, error) {
var nodes []bug.Comment
- var edges []models.CommentEdge
+ var edges []*models.CommentEdge
var cursors []string
- var pageInfo models.PageInfo
+ var pageInfo = &models.PageInfo{}
var totalCount = len(source)
emptyCon, _ := conMaker(edges, nodes, pageInfo, 0)
@@ -57,18 +57,20 @@ func CommentCon(source []bug.Comment, edgeMaker CommentEdgeMaker, conMaker Comme
break
}
- edges = append(edges, edge.(models.CommentEdge))
+ e := edge.(models.CommentEdge)
+ edges = append(edges, &e)
cursors = append(cursors, edge.GetCursor())
nodes = append(nodes, value)
}
} else {
- edges = make([]models.CommentEdge, len(source))
+ edges = make([]*models.CommentEdge, len(source))
cursors = make([]string, len(source))
nodes = source
for i, value := range source {
edge := edgeMaker(value, i+offset)
- edges[i] = edge.(models.CommentEdge)
+ e := edge.(models.CommentEdge)
+ edges[i] = &e
cursors[i] = edge.GetCursor()
}
}
diff --git a/graphql/connections/gen_identity.go b/graphql/connections/gen_identity.go
index 6c1e7137..b52b6f96 100644
--- a/graphql/connections/gen_identity.go
+++ b/graphql/connections/gen_identity.go
@@ -17,17 +17,17 @@ type IdentityEdgeMaker func(value identity.Interface, offset int) Edge
// IdentityConMaker define a function that create a models.IdentityConnection
type IdentityConMaker func(
- edges []models.IdentityEdge,
+ edges []*models.IdentityEdge,
nodes []identity.Interface,
- info models.PageInfo,
+ info *models.PageInfo,
totalCount int) (*models.IdentityConnection, error)
// IdentityCon will paginate a source according to the input of a relay connection
func IdentityCon(source []identity.Interface, edgeMaker IdentityEdgeMaker, conMaker IdentityConMaker, input models.ConnectionInput) (*models.IdentityConnection, error) {
var nodes []identity.Interface
- var edges []models.IdentityEdge
+ var edges []*models.IdentityEdge
var cursors []string
- var pageInfo models.PageInfo
+ var pageInfo = &models.PageInfo{}
var totalCount = len(source)
emptyCon, _ := conMaker(edges, nodes, pageInfo, 0)
@@ -57,18 +57,20 @@ func IdentityCon(source []identity.Interface, edgeMaker IdentityEdgeMaker, conMa
break
}
- edges = append(edges, edge.(models.IdentityEdge))
+ e := edge.(models.IdentityEdge)
+ edges = append(edges, &e)
cursors = append(cursors, edge.GetCursor())
nodes = append(nodes, value)
}
} else {
- edges = make([]models.IdentityEdge, len(source))
+ edges = make([]*models.IdentityEdge, len(source))
cursors = make([]string, len(source))
nodes = source
for i, value := range source {
edge := edgeMaker(value, i+offset)
- edges[i] = edge.(models.IdentityEdge)
+ e := edge.(models.IdentityEdge)
+ edges[i] = &e
cursors[i] = edge.GetCursor()
}
}
diff --git a/graphql/connections/gen_lazy_bug.go b/graphql/connections/gen_lazy_bug.go
index e9da5cc7..6c9eb012 100644
--- a/graphql/connections/gen_lazy_bug.go
+++ b/graphql/connections/gen_lazy_bug.go
@@ -16,17 +16,17 @@ type LazyBugEdgeMaker func(value string, offset int) Edge
// LazyBugConMaker define a function that create a models.BugConnection
type LazyBugConMaker func(
- edges []LazyBugEdge,
+ edges []*LazyBugEdge,
nodes []string,
- info models.PageInfo,
+ 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
- var edges []LazyBugEdge
+ var edges []*LazyBugEdge
var cursors []string
- var pageInfo models.PageInfo
+ var pageInfo = &models.PageInfo{}
var totalCount = len(source)
emptyCon, _ := conMaker(edges, nodes, pageInfo, 0)
@@ -56,18 +56,20 @@ func LazyBugCon(source []string, edgeMaker LazyBugEdgeMaker, conMaker LazyBugCon
break
}
- edges = append(edges, edge.(LazyBugEdge))
+ e := edge.(LazyBugEdge)
+ edges = append(edges, &e)
cursors = append(cursors, edge.GetCursor())
nodes = append(nodes, value)
}
} else {
- edges = make([]LazyBugEdge, len(source))
+ edges = make([]*LazyBugEdge, len(source))
cursors = make([]string, len(source))
nodes = source
for i, value := range source {
edge := edgeMaker(value, i+offset)
- edges[i] = edge.(LazyBugEdge)
+ e := edge.(LazyBugEdge)
+ edges[i] = &e
cursors[i] = edge.GetCursor()
}
}
diff --git a/graphql/connections/gen_lazy_identity.go b/graphql/connections/gen_lazy_identity.go
index 8bb2097d..96461be5 100644
--- a/graphql/connections/gen_lazy_identity.go
+++ b/graphql/connections/gen_lazy_identity.go
@@ -16,17 +16,17 @@ type LazyIdentityEdgeMaker func(value string, offset int) Edge
// LazyIdentityConMaker define a function that create a models.IdentityConnection
type LazyIdentityConMaker func(
- edges []LazyIdentityEdge,
+ edges []*LazyIdentityEdge,
nodes []string,
- info models.PageInfo,
+ info *models.PageInfo,
totalCount int) (*models.IdentityConnection, error)
// LazyIdentityCon will paginate a source according to the input of a relay connection
func LazyIdentityCon(source []string, edgeMaker LazyIdentityEdgeMaker, conMaker LazyIdentityConMaker, input models.ConnectionInput) (*models.IdentityConnection, error) {
var nodes []string
- var edges []LazyIdentityEdge
+ var edges []*LazyIdentityEdge
var cursors []string
- var pageInfo models.PageInfo
+ var pageInfo = &models.PageInfo{}
var totalCount = len(source)
emptyCon, _ := conMaker(edges, nodes, pageInfo, 0)
@@ -56,18 +56,20 @@ func LazyIdentityCon(source []string, edgeMaker LazyIdentityEdgeMaker, conMaker
break
}
- edges = append(edges, edge.(LazyIdentityEdge))
+ e := edge.(LazyIdentityEdge)
+ edges = append(edges, &e)
cursors = append(cursors, edge.GetCursor())
nodes = append(nodes, value)
}
} else {
- edges = make([]LazyIdentityEdge, len(source))
+ edges = make([]*LazyIdentityEdge, len(source))
cursors = make([]string, len(source))
nodes = source
for i, value := range source {
edge := edgeMaker(value, i+offset)
- edges[i] = edge.(LazyIdentityEdge)
+ e := edge.(LazyIdentityEdge)
+ edges[i] = &e
cursors[i] = edge.GetCursor()
}
}
diff --git a/graphql/connections/gen_operation.go b/graphql/connections/gen_operation.go
index f9273f06..0f40e2c4 100644
--- a/graphql/connections/gen_operation.go
+++ b/graphql/connections/gen_operation.go
@@ -17,17 +17,17 @@ type OperationEdgeMaker func(value bug.Operation, offset int) Edge
// OperationConMaker define a function that create a models.OperationConnection
type OperationConMaker func(
- edges []models.OperationEdge,
+ edges []*models.OperationEdge,
nodes []bug.Operation,
- info models.PageInfo,
+ info *models.PageInfo,
totalCount int) (*models.OperationConnection, error)
// OperationCon will paginate a source according to the input of a relay connection
func OperationCon(source []bug.Operation, edgeMaker OperationEdgeMaker, conMaker OperationConMaker, input models.ConnectionInput) (*models.OperationConnection, error) {
var nodes []bug.Operation
- var edges []models.OperationEdge
+ var edges []*models.OperationEdge
var cursors []string
- var pageInfo models.PageInfo
+ var pageInfo = &models.PageInfo{}
var totalCount = len(source)
emptyCon, _ := conMaker(edges, nodes, pageInfo, 0)
@@ -57,18 +57,20 @@ func OperationCon(source []bug.Operation, edgeMaker OperationEdgeMaker, conMaker
break
}
- edges = append(edges, edge.(models.OperationEdge))
+ e := edge.(models.OperationEdge)
+ edges = append(edges, &e)
cursors = append(cursors, edge.GetCursor())
nodes = append(nodes, value)
}
} else {
- edges = make([]models.OperationEdge, len(source))
+ edges = make([]*models.OperationEdge, len(source))
cursors = make([]string, len(source))
nodes = source
for i, value := range source {
edge := edgeMaker(value, i+offset)
- edges[i] = edge.(models.OperationEdge)
+ e := edge.(models.OperationEdge)
+ edges[i] = &e
cursors[i] = edge.GetCursor()
}
}
diff --git a/graphql/connections/gen_timeline.go b/graphql/connections/gen_timeline.go
index ad3fbf5b..01dac96b 100644
--- a/graphql/connections/gen_timeline.go
+++ b/graphql/connections/gen_timeline.go
@@ -17,17 +17,17 @@ type TimelineItemEdgeMaker func(value bug.TimelineItem, offset int) Edge
// TimelineItemConMaker define a function that create a models.TimelineItemConnection
type TimelineItemConMaker func(
- edges []models.TimelineItemEdge,
+ edges []*models.TimelineItemEdge,
nodes []bug.TimelineItem,
- info models.PageInfo,
+ info *models.PageInfo,
totalCount int) (*models.TimelineItemConnection, error)
// TimelineItemCon will paginate a source according to the input of a relay connection
func TimelineItemCon(source []bug.TimelineItem, edgeMaker TimelineItemEdgeMaker, conMaker TimelineItemConMaker, input models.ConnectionInput) (*models.TimelineItemConnection, error) {
var nodes []bug.TimelineItem
- var edges []models.TimelineItemEdge
+ var edges []*models.TimelineItemEdge
var cursors []string
- var pageInfo models.PageInfo
+ var pageInfo = &models.PageInfo{}
var totalCount = len(source)
emptyCon, _ := conMaker(edges, nodes, pageInfo, 0)
@@ -57,18 +57,20 @@ func TimelineItemCon(source []bug.TimelineItem, edgeMaker TimelineItemEdgeMaker,
break
}
- edges = append(edges, edge.(models.TimelineItemEdge))
+ e := edge.(models.TimelineItemEdge)
+ edges = append(edges, &e)
cursors = append(cursors, edge.GetCursor())
nodes = append(nodes, value)
}
} else {
- edges = make([]models.TimelineItemEdge, len(source))
+ edges = make([]*models.TimelineItemEdge, len(source))
cursors = make([]string, len(source))
nodes = source
for i, value := range source {
edge := edgeMaker(value, i+offset)
- edges[i] = edge.(models.TimelineItemEdge)
+ e := edge.(models.TimelineItemEdge)
+ edges[i] = &e
cursors[i] = edge.GetCursor()
}
}