From 82120cfb3d2c08191db4e83665e46a396be542de Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Wed, 29 Mar 2023 10:54:16 +0200 Subject: [PATCH] Update generated.go --- internal/graph/generated/generated.go | 87 +++++++++++++++++++++++---- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/internal/graph/generated/generated.go b/internal/graph/generated/generated.go index ea92255..23f4f02 100644 --- a/internal/graph/generated/generated.go +++ b/internal/graph/generated/generated.go @@ -3292,9 +3292,9 @@ func (ec *executionContext) _Job_walltime(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNInt2int64(ctx, field.Selections, res) + return ec.marshalNInt2ᚖint64(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Job_walltime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3380,9 +3380,9 @@ func (ec *executionContext) _Job_numHWThreads(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(int32) + res := resTmp.(*int32) fc.Result = res - return ec.marshalNInt2int32(ctx, field.Selections, res) + return ec.marshalNInt2ᚖint32(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Job_numHWThreads(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3424,9 +3424,9 @@ func (ec *executionContext) _Job_numAcc(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(int32) + res := resTmp.(*int32) fc.Result = res - return ec.marshalNInt2int32(ctx, field.Selections, res) + return ec.marshalNInt2ᚖint32(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Job_numAcc(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3468,9 +3468,9 @@ func (ec *executionContext) _Job_SMT(ctx context.Context, field graphql.Collecte } return graphql.Null } - res := resTmp.(int32) + res := resTmp.(*int32) fc.Result = res - return ec.marshalNInt2int32(ctx, field.Selections, res) + return ec.marshalNInt2ᚖint32(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Job_SMT(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3556,9 +3556,9 @@ func (ec *executionContext) _Job_partition(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Job_partition(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -3600,9 +3600,9 @@ func (ec *executionContext) _Job_arrayJobId(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNInt2int64(ctx, field.Selections, res) + return ec.marshalNInt2ᚖint64(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Job_arrayJobId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -13512,6 +13512,48 @@ func (ec *executionContext) marshalNInt2ᚖint(ctx context.Context, sel ast.Sele return res } +func (ec *executionContext) unmarshalNInt2ᚖint32(ctx context.Context, v interface{}) (*int32, error) { + res, err := graphql.UnmarshalInt32(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNInt2ᚖint32(ctx context.Context, sel ast.SelectionSet, v *int32) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + res := graphql.MarshalInt32(*v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNInt2ᚖint64(ctx context.Context, v interface{}) (*int64, error) { + res, err := graphql.UnmarshalInt64(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNInt2ᚖint64(ctx context.Context, sel ast.SelectionSet, v *int64) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + res := graphql.MarshalInt64(*v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + func (ec *executionContext) marshalNJob2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑbackendᚋpkgᚋschemaᚐJobᚄ(ctx context.Context, sel ast.SelectionSet, v []*schema.Job) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup @@ -14080,6 +14122,27 @@ func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel return ret } +func (ec *executionContext) unmarshalNString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { + res, err := graphql.UnmarshalString(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + res := graphql.MarshalString(*v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + func (ec *executionContext) marshalNSubCluster2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑbackendᚋpkgᚋschemaᚐSubClusterᚄ(ctx context.Context, sel ast.SelectionSet, v []*schema.SubCluster) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup