~sircmpwn/meta.sr.ht

fb53585f5b20230960af8104364babb04e5c04aa — Drew DeVault 1 year, 7 months ago 2b353de 0.56.19
API: suspensionNotice is nullable
2 files changed, 3 insertions(+), 30 deletions(-)

M api/graph/api/generated.go
M api/graph/schema.graphqls
M api/graph/api/generated.go => api/graph/api/generated.go +2 -29
@@ 1594,7 1594,7 @@ type User implements Entity {
  bio: String

  userType: UserType! @internal
  suspensionNotice: String! @internal
  suspensionNotice: String @internal

  sshKeys(cursor: Cursor): SSHKeyCursor! @access(scope: SSH_KEYS, kind: RO)
  pgpKeys(cursor: Cursor): PGPKeyCursor! @access(scope: PGP_KEYS, kind: RO)


@@ 7762,14 7762,11 @@ func (ec *executionContext) _User_suspensionNotice(ctx context.Context, field gr
		return graphql.Null
	}
	if resTmp == nil {
		if !graphql.HasFieldError(ctx, fc) {
			ec.Errorf(ctx, "must not be null")
		}
		return graphql.Null
	}
	res := resTmp.(*string)
	fc.Result = res
	return ec.marshalNString2ᚖstring(ctx, field.Selections, res)
	return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}

func (ec *executionContext) _User_sshKeys(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {


@@ 10824,9 10821,6 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj
			}
		case "suspensionNotice":
			out.Values[i] = ec._User_suspensionNotice(ctx, field, obj)
			if out.Values[i] == graphql.Null {
				atomic.AddUint32(&invalids, 1)
			}
		case "sshKeys":
			field := field
			out.Concurrently(i, func() (res graphql.Marshaler) {


@@ 11775,27 11769,6 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S
	return res
}

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, "must not be null")
		}
		return graphql.Null
	}
	res := graphql.MarshalString(*v)
	if res == graphql.Null {
		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
			ec.Errorf(ctx, "must not be null")
		}
	}
	return res
}

func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
	res, err := graphql.UnmarshalTime(v)
	return res, graphql.ErrorOnPath(ctx, err)

M api/graph/schema.graphqls => api/graph/schema.graphqls +1 -1
@@ 76,7 76,7 @@ type User implements Entity {
  bio: String

  userType: UserType! @internal
  suspensionNotice: String! @internal
  suspensionNotice: String @internal

  sshKeys(cursor: Cursor): SSHKeyCursor! @access(scope: SSH_KEYS, kind: RO)
  pgpKeys(cursor: Cursor): PGPKeyCursor! @access(scope: PGP_KEYS, kind: RO)