Make descriptions nullable

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-11-05 16:48:58 +01:00
parent 637f097cc6
commit 288c59a5f2
60 changed files with 311 additions and 375 deletions

View File

@@ -461,7 +461,7 @@ type VendorEdge {
type TrustCenterReference implements Node {
id: ID!
name: String!
description: String!
description: String
websiteUrl: String!
logoUrl: String! @goField(forceResolver: true)
}

View File

@@ -1624,7 +1624,7 @@ type VendorEdge {
type TrustCenterReference implements Node {
id: ID!
name: String!
description: String!
description: String
websiteUrl: String!
logoUrl: String! @goField(forceResolver: true)
}
@@ -6809,14 +6809,11 @@ func (ec *executionContext) _TrustCenterReference_description(ctx context.Contex
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
res := resTmp.(*string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TrustCenterReference_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
@@ -11683,9 +11680,6 @@ func (ec *executionContext) _TrustCenterReference(ctx context.Context, sel ast.S
}
case "description":
out.Values[i] = ec._TrustCenterReference_description(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
}
case "websiteUrl":
out.Values[i] = ec._TrustCenterReference_websiteUrl(ctx, field, obj)
if out.Values[i] == graphql.Null {

View File

@@ -220,7 +220,7 @@ type TrustCenterFileEdge struct {
type TrustCenterReference struct {
ID gid.GID `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Description *string `json:"description,omitempty"`
WebsiteURL string `json:"websiteUrl"`
LogoURL string `json:"logoUrl"`
}