feature: verify tokens
This commit is contained in:
@@ -55,7 +55,7 @@ func (ec *executionContext) _AuthUser_id(ctx context.Context, field graphql.Coll
|
||||
}
|
||||
res := resTmp.(string)
|
||||
fc.Result = res
|
||||
return ec.marshalNID2string(ctx, field.Selections, res)
|
||||
return ec.marshalNUID2string(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_AuthUser_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
@@ -65,7 +65,7 @@ func (ec *executionContext) fieldContext_AuthUser_id(_ context.Context, field gr
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type ID does not have child fields")
|
||||
return nil, errors.New("field of type UID does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
@@ -115,8 +115,8 @@ func (ec *executionContext) fieldContext_AuthUser_email(_ context.Context, field
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _AuthUser_displayName(ctx context.Context, field graphql.CollectedField, obj *model.AuthUser) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_AuthUser_displayName(ctx, field)
|
||||
func (ec *executionContext) _AuthUser_name(ctx context.Context, field graphql.CollectedField, obj *model.AuthUser) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_AuthUser_name(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
@@ -129,7 +129,7 @@ func (ec *executionContext) _AuthUser_displayName(ctx context.Context, field gra
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.DisplayName, nil
|
||||
return obj.Name, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
@@ -146,7 +146,7 @@ func (ec *executionContext) _AuthUser_displayName(ctx context.Context, field gra
|
||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_AuthUser_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
func (ec *executionContext) fieldContext_AuthUser_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "AuthUser",
|
||||
Field: field,
|
||||
@@ -236,8 +236,8 @@ func (ec *executionContext) _AuthUser(ctx context.Context, sel ast.SelectionSet,
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
}
|
||||
case "displayName":
|
||||
out.Values[i] = ec._AuthUser_displayName(ctx, field, obj)
|
||||
case "name":
|
||||
out.Values[i] = ec._AuthUser_name(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user