|
|
|
@@ -184,6 +184,7 @@ type ComplexityRoot struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Pagination struct {
|
|
|
|
|
Cursor func(childComplexity int) int
|
|
|
|
|
Limit func(childComplexity int) int
|
|
|
|
|
Offset func(childComplexity int) int
|
|
|
|
|
Page func(childComplexity int) int
|
|
|
|
@@ -1301,6 +1302,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|
|
|
|
|
|
|
|
|
return e.complexity.Mutation.VerifyOtp(childComplexity, args["params"].(model.VerifyOTPRequest)), true
|
|
|
|
|
|
|
|
|
|
case "Pagination.cursor":
|
|
|
|
|
if e.complexity.Pagination.Cursor == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.Pagination.Cursor(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "Pagination.limit":
|
|
|
|
|
if e.complexity.Pagination.Limit == nil {
|
|
|
|
|
break
|
|
|
|
@@ -1905,6 +1913,7 @@ scalar Any
|
|
|
|
|
type Pagination {
|
|
|
|
|
limit: Int64!
|
|
|
|
|
page: Int64!
|
|
|
|
|
cursor: String
|
|
|
|
|
offset: Int64!
|
|
|
|
|
total: Int64!
|
|
|
|
|
}
|
|
|
|
@@ -2257,6 +2266,7 @@ input SessionQueryInput {
|
|
|
|
|
input PaginationInput {
|
|
|
|
|
limit: Int64
|
|
|
|
|
page: Int64
|
|
|
|
|
cursor: String
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input PaginatedInput {
|
|
|
|
@@ -7141,6 +7151,38 @@ func (ec *executionContext) _Pagination_page(ctx context.Context, field graphql.
|
|
|
|
|
return ec.marshalNInt642int64(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Pagination_cursor(ctx context.Context, field graphql.CollectedField, obj *model.Pagination) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "Pagination",
|
|
|
|
|
Field: field,
|
|
|
|
|
Args: nil,
|
|
|
|
|
IsMethod: false,
|
|
|
|
|
IsResolver: false,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
|
return obj.Cursor, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*string)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Pagination_offset(ctx context.Context, field graphql.CollectedField, obj *model.Pagination) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
@@ -11145,6 +11187,14 @@ func (ec *executionContext) unmarshalInputPaginationInput(ctx context.Context, o
|
|
|
|
|
if err != nil {
|
|
|
|
|
return it, err
|
|
|
|
|
}
|
|
|
|
|
case "cursor":
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
|
|
|
it.Cursor, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return it, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -12928,6 +12978,8 @@ func (ec *executionContext) _Pagination(ctx context.Context, sel ast.SelectionSe
|
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
|
invalids++
|
|
|
|
|
}
|
|
|
|
|
case "cursor":
|
|
|
|
|
out.Values[i] = ec._Pagination_cursor(ctx, field, obj)
|
|
|
|
|
case "offset":
|
|
|
|
|
out.Values[i] = ec._Pagination_offset(ctx, field, obj)
|
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
|