aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/graph/gen_graph.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-08-14 13:32:03 +0200
committerMichael Muré <batolettre@gmail.com>2018-08-14 14:20:35 +0200
commitef0d8fa108fbdef24997a84a3c6ecbf21cbc0a9e (patch)
tree35585e4bfaa1cd1308e95a772f3dc7fa5efacb40 /graphql/graph/gen_graph.go
parent43f808a0e263ada899acb5cc523cfcab6d07c20d (diff)
downloadgit-bug-ef0d8fa108fbdef24997a84a3c6ecbf21cbc0a9e.tar.gz
graphql: expose startCursor and endCursor as well for a connection
Diffstat (limited to 'graphql/graph/gen_graph.go')
-rw-r--r--graphql/graph/gen_graph.go30
1 files changed, 28 insertions, 2 deletions
diff --git a/graphql/graph/gen_graph.go b/graphql/graph/gen_graph.go
index a9c40e1f..605fa15a 100644
--- a/graphql/graph/gen_graph.go
+++ b/graphql/graph/gen_graph.go
@@ -1884,6 +1884,10 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel []query.Selection
out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj)
case "hasPreviousPage":
out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj)
+ case "startCursor":
+ out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj)
+ case "endCursor":
+ out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -1914,6 +1918,28 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field
return graphql.MarshalBoolean(res)
}
+func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
+ rctx := graphql.GetResolverContext(ctx)
+ rctx.Object = "PageInfo"
+ rctx.Args = nil
+ rctx.Field = field
+ rctx.PushField(field.Alias)
+ defer rctx.Pop()
+ res := obj.StartCursor
+ return graphql.MarshalString(res)
+}
+
+func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
+ rctx := graphql.GetResolverContext(ctx)
+ rctx.Object = "PageInfo"
+ rctx.Args = nil
+ rctx.Field = field
+ rctx.PushField(field.Alias)
+ defer rctx.Pop()
+ res := obj.EndCursor
+ return graphql.MarshalString(res)
+}
+
var personImplementors = []string{"Person"}
// nolint: gocyclo, errcheck, gas, goconst
@@ -3222,9 +3248,9 @@ type PageInfo {
# When paginating backwards, are there more items?
hasPreviousPage: Boolean!
# When paginating backwards, the cursor to continue.
-# startCursor: String
+ startCursor: String!
# When paginating forwards, the cursor to continue.
-# endCursor: String
+ endCursor: String!
}
# Represents an person in a git object.