fix: make hasnextpage optional parameter, use only if inf scroll configured

This commit is contained in:
Christoph Kluge
2024-03-26 16:27:04 +01:00
parent b9b452f043
commit 0dee5073c6
5 changed files with 24 additions and 26 deletions

View File

@@ -1995,7 +1995,7 @@ type JobResultList {
offset: Int
limit: Int
count: Int
hasNextPage: Boolean!
hasNextPage: Boolean
}
type JobLinkResultList {
@@ -5251,14 +5251,11 @@ func (ec *executionContext) _JobResultList_hasNextPage(ctx context.Context, fiel
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
res := resTmp.(*bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
return ec.marshalOBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_JobResultList_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
@@ -13464,9 +13461,6 @@ func (ec *executionContext) _JobResultList(ctx context.Context, sel ast.Selectio
out.Values[i] = ec._JobResultList_count(ctx, field, obj)
case "hasNextPage":
out.Values[i] = ec._JobResultList_hasNextPage(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}