Hopefully fixed all album cover photo tests.

This commit is contained in:
Peter - Ubuntu dual boot
2021-09-23 01:18:41 +01:00
parent 0a4a228031
commit 72edfc3566
3 changed files with 120 additions and 211 deletions

View File

@@ -1947,7 +1947,7 @@ type Album {
shares: [ShareToken!]!
coverID: Int!
coverID: Int
}
type MediaURL {
@@ -3362,14 +3362,11 @@ func (ec *executionContext) _Album_coverID(ctx context.Context, field graphql.Co
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*int)
fc.Result = res
return ec.marshalNInt2ᚖint(ctx, field.Selections, res)
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
}
func (ec *executionContext) _AuthorizeResult_success(ctx context.Context, field graphql.CollectedField, obj *models.AuthorizeResult) (ret graphql.Marshaler) {
@@ -10366,9 +10363,6 @@ func (ec *executionContext) _Album(ctx context.Context, sel ast.SelectionSet, ob
})
case "coverID":
out.Values[i] = ec._Album_coverID(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -12238,27 +12232,6 @@ func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.Selec
return res
}
func (ec *executionContext) unmarshalNInt2ᚖint(ctx context.Context, v interface{}) (*int, error) {
res, err := graphql.UnmarshalInt(v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := graphql.MarshalInt(*v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "must not be null")
}
}
return res
}
func (ec *executionContext) marshalNMedia2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx context.Context, sel ast.SelectionSet, v models.Media) graphql.Marshaler {
return ec._Media(ctx, sel, &v)
}