Clean Up
This commit is contained in:
@@ -43,6 +43,7 @@ type ResolverRoot interface {
|
||||
|
||||
type DirectiveRoot struct {
|
||||
HasMinRole func(ctx context.Context, obj interface{}, next graphql.Resolver, role model.Role) (res interface{}, err error)
|
||||
IsPrivate func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
|
||||
Meta func(ctx context.Context, obj interface{}, next graphql.Resolver, gorm *string) (res interface{}, err error)
|
||||
}
|
||||
|
||||
@@ -243,21 +244,21 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.AlbumResponse.PageInfo(childComplexity), true
|
||||
|
||||
case "AuthResponse.Device":
|
||||
case "AuthResponse.device":
|
||||
if e.complexity.AuthResponse.Device == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.AuthResponse.Device(childComplexity), true
|
||||
|
||||
case "AuthResponse.Error":
|
||||
case "AuthResponse.error":
|
||||
if e.complexity.AuthResponse.Error == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.AuthResponse.Error(childComplexity), true
|
||||
|
||||
case "AuthResponse.Result":
|
||||
case "AuthResponse.result":
|
||||
if e.complexity.AuthResponse.Result == nil {
|
||||
break
|
||||
}
|
||||
@@ -863,6 +864,7 @@ scalar Upload
|
||||
|
||||
# https://gqlgen.com/reference/directives/
|
||||
directive @hasMinRole(role: Role!) on FIELD_DEFINITION
|
||||
directive @isPrivate on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
|
||||
|
||||
directive @meta(
|
||||
gorm: String,
|
||||
@@ -899,9 +901,9 @@ enum AuthResult {
|
||||
}
|
||||
|
||||
type AuthResponse {
|
||||
Result: AuthResult!
|
||||
Device: Device
|
||||
Error: String
|
||||
result: AuthResult!
|
||||
device: Device
|
||||
error: String
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
@@ -1004,7 +1006,7 @@ type Device {
|
||||
type: DeviceType! @meta(gorm: "default:Unknown;not null")
|
||||
userID: ID! @meta(gorm: "not null")
|
||||
user: User! @meta(gorm: "foreignKey:ID;references:UserID;not null")
|
||||
refreshKey: String
|
||||
refreshKey: String @deprecated(reason: "Private Field") # @isPrivate
|
||||
}
|
||||
|
||||
type User {
|
||||
@@ -1017,7 +1019,7 @@ type User {
|
||||
lastName: String
|
||||
role: Role! @meta(gorm: "default:User;not null")
|
||||
authType: AuthType! @meta(gorm: "default:Local;not null")
|
||||
password: String
|
||||
password: String @deprecated(reason: "Private Field") #@isPrivate
|
||||
}
|
||||
|
||||
type MediaItem {
|
||||
@@ -1927,7 +1929,7 @@ func (ec *executionContext) _AlbumResponse_pageInfo(ctx context.Context, field g
|
||||
return ec.marshalNPageInfo2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) _AuthResponse_Result(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
||||
func (ec *executionContext) _AuthResponse_result(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
@@ -1962,7 +1964,7 @@ func (ec *executionContext) _AuthResponse_Result(ctx context.Context, field grap
|
||||
return ec.marshalNAuthResult2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthResult(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) _AuthResponse_Device(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
||||
func (ec *executionContext) _AuthResponse_device(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
@@ -1994,7 +1996,7 @@ func (ec *executionContext) _AuthResponse_Device(ctx context.Context, field grap
|
||||
return ec.marshalODevice2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDevice(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) _AuthResponse_Error(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
||||
func (ec *executionContext) _AuthResponse_error(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
@@ -7553,15 +7555,15 @@ func (ec *executionContext) _AuthResponse(ctx context.Context, sel ast.Selection
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
out.Values[i] = graphql.MarshalString("AuthResponse")
|
||||
case "Result":
|
||||
out.Values[i] = ec._AuthResponse_Result(ctx, field, obj)
|
||||
case "result":
|
||||
out.Values[i] = ec._AuthResponse_result(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
invalids++
|
||||
}
|
||||
case "Device":
|
||||
out.Values[i] = ec._AuthResponse_Device(ctx, field, obj)
|
||||
case "Error":
|
||||
out.Values[i] = ec._AuthResponse_Error(ctx, field, obj)
|
||||
case "device":
|
||||
out.Values[i] = ec._AuthResponse_device(ctx, field, obj)
|
||||
case "error":
|
||||
out.Values[i] = ec._AuthResponse_error(ctx, field, obj)
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user