Moregit add internal/*
This commit is contained in:
@@ -115,19 +115,19 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
Query struct {
|
||||
Album func(childComplexity int, id string) int
|
||||
Albums func(childComplexity int, filter *model.AlbumFilter, count *int, page *int) int
|
||||
Device func(childComplexity int, id string) int
|
||||
Devices func(childComplexity int, filter *model.DeviceFilter, count *int, page *int) int
|
||||
Album func(childComplexity int, id string, delete *bool) int
|
||||
Albums func(childComplexity int, delete *bool, filter *model.AlbumFilter, count *int, page *int) int
|
||||
Device func(childComplexity int, id string, delete *bool) int
|
||||
Devices func(childComplexity int, delete *bool, filter *model.DeviceFilter, count *int, page *int) int
|
||||
Login func(childComplexity int, user string, password string, deviceID *string) int
|
||||
Logout func(childComplexity int) int
|
||||
Me func(childComplexity int) int
|
||||
MediaItem func(childComplexity int, id string) int
|
||||
MediaItems func(childComplexity int, filter *model.MediaItemFilter, count *int, page *int) int
|
||||
Tag func(childComplexity int, id string) int
|
||||
Tags func(childComplexity int, filter *model.TagFilter, count *int, page *int) int
|
||||
User func(childComplexity int, id string) int
|
||||
Users func(childComplexity int, filter *model.UserFilter, count *int, page *int) int
|
||||
Me func(childComplexity int, delete *bool) int
|
||||
MediaItem func(childComplexity int, id string, delete *bool) int
|
||||
MediaItems func(childComplexity int, delete *bool, filter *model.MediaItemFilter, count *int, page *int) int
|
||||
Tag func(childComplexity int, id string, delete *bool) int
|
||||
Tags func(childComplexity int, delete *bool, filter *model.TagFilter, count *int, page *int) int
|
||||
User func(childComplexity int, id string, delete *bool) int
|
||||
Users func(childComplexity int, delete *bool, filter *model.UserFilter, count *int, page *int) int
|
||||
}
|
||||
|
||||
Tag struct {
|
||||
@@ -172,17 +172,17 @@ type MutationResolver interface {
|
||||
type QueryResolver interface {
|
||||
Login(ctx context.Context, user string, password string, deviceID *string) (*model.AuthResponse, error)
|
||||
Logout(ctx context.Context) (*model.AuthResponse, error)
|
||||
MediaItem(ctx context.Context, id string) (*model.MediaItem, error)
|
||||
Device(ctx context.Context, id string) (*model.Device, error)
|
||||
Album(ctx context.Context, id string) (*model.Album, error)
|
||||
User(ctx context.Context, id string) (*model.User, error)
|
||||
Tag(ctx context.Context, id string) (*model.Tag, error)
|
||||
Me(ctx context.Context) (*model.User, error)
|
||||
MediaItems(ctx context.Context, filter *model.MediaItemFilter, count *int, page *int) (*model.MediaItemResponse, error)
|
||||
Devices(ctx context.Context, filter *model.DeviceFilter, count *int, page *int) (*model.DeviceResponse, error)
|
||||
Albums(ctx context.Context, filter *model.AlbumFilter, count *int, page *int) (*model.AlbumResponse, error)
|
||||
Tags(ctx context.Context, filter *model.TagFilter, count *int, page *int) (*model.TagResponse, error)
|
||||
Users(ctx context.Context, filter *model.UserFilter, count *int, page *int) (*model.UserResponse, error)
|
||||
MediaItem(ctx context.Context, id string, delete *bool) (*model.MediaItem, error)
|
||||
Device(ctx context.Context, id string, delete *bool) (*model.Device, error)
|
||||
Album(ctx context.Context, id string, delete *bool) (*model.Album, error)
|
||||
User(ctx context.Context, id string, delete *bool) (*model.User, error)
|
||||
Tag(ctx context.Context, id string, delete *bool) (*model.Tag, error)
|
||||
Me(ctx context.Context, delete *bool) (*model.User, error)
|
||||
MediaItems(ctx context.Context, delete *bool, filter *model.MediaItemFilter, count *int, page *int) (*model.MediaItemResponse, error)
|
||||
Devices(ctx context.Context, delete *bool, filter *model.DeviceFilter, count *int, page *int) (*model.DeviceResponse, error)
|
||||
Albums(ctx context.Context, delete *bool, filter *model.AlbumFilter, count *int, page *int) (*model.AlbumResponse, error)
|
||||
Tags(ctx context.Context, delete *bool, filter *model.TagFilter, count *int, page *int) (*model.TagResponse, error)
|
||||
Users(ctx context.Context, delete *bool, filter *model.UserFilter, count *int, page *int) (*model.UserResponse, error)
|
||||
}
|
||||
|
||||
type executableSchema struct {
|
||||
@@ -503,7 +503,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.Album(childComplexity, args["id"].(string)), true
|
||||
return e.complexity.Query.Album(childComplexity, args["id"].(string), args["delete"].(*bool)), true
|
||||
|
||||
case "Query.albums":
|
||||
if e.complexity.Query.Albums == nil {
|
||||
@@ -515,7 +515,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.Albums(childComplexity, args["filter"].(*model.AlbumFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
return e.complexity.Query.Albums(childComplexity, args["delete"].(*bool), args["filter"].(*model.AlbumFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
|
||||
case "Query.device":
|
||||
if e.complexity.Query.Device == nil {
|
||||
@@ -527,7 +527,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.Device(childComplexity, args["id"].(string)), true
|
||||
return e.complexity.Query.Device(childComplexity, args["id"].(string), args["delete"].(*bool)), true
|
||||
|
||||
case "Query.devices":
|
||||
if e.complexity.Query.Devices == nil {
|
||||
@@ -539,7 +539,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.Devices(childComplexity, args["filter"].(*model.DeviceFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
return e.complexity.Query.Devices(childComplexity, args["delete"].(*bool), args["filter"].(*model.DeviceFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
|
||||
case "Query.login":
|
||||
if e.complexity.Query.Login == nil {
|
||||
@@ -565,7 +565,12 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Query.Me(childComplexity), true
|
||||
args, err := ec.field_Query_me_args(context.TODO(), rawArgs)
|
||||
if err != nil {
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.Me(childComplexity, args["delete"].(*bool)), true
|
||||
|
||||
case "Query.mediaItem":
|
||||
if e.complexity.Query.MediaItem == nil {
|
||||
@@ -577,7 +582,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.MediaItem(childComplexity, args["id"].(string)), true
|
||||
return e.complexity.Query.MediaItem(childComplexity, args["id"].(string), args["delete"].(*bool)), true
|
||||
|
||||
case "Query.mediaItems":
|
||||
if e.complexity.Query.MediaItems == nil {
|
||||
@@ -589,7 +594,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.MediaItems(childComplexity, args["filter"].(*model.MediaItemFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
return e.complexity.Query.MediaItems(childComplexity, args["delete"].(*bool), args["filter"].(*model.MediaItemFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
|
||||
case "Query.tag":
|
||||
if e.complexity.Query.Tag == nil {
|
||||
@@ -601,7 +606,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.Tag(childComplexity, args["id"].(string)), true
|
||||
return e.complexity.Query.Tag(childComplexity, args["id"].(string), args["delete"].(*bool)), true
|
||||
|
||||
case "Query.tags":
|
||||
if e.complexity.Query.Tags == nil {
|
||||
@@ -613,7 +618,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.Tags(childComplexity, args["filter"].(*model.TagFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
return e.complexity.Query.Tags(childComplexity, args["delete"].(*bool), args["filter"].(*model.TagFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
|
||||
case "Query.user":
|
||||
if e.complexity.Query.User == nil {
|
||||
@@ -625,7 +630,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.User(childComplexity, args["id"].(string)), true
|
||||
return e.complexity.Query.User(childComplexity, args["id"].(string), args["delete"].(*bool)), true
|
||||
|
||||
case "Query.users":
|
||||
if e.complexity.Query.Users == nil {
|
||||
@@ -637,7 +642,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.Users(childComplexity, args["filter"].(*model.UserFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
return e.complexity.Query.Users(childComplexity, args["delete"].(*bool), args["filter"].(*model.UserFilter), args["count"].(*int), args["page"].(*int)), true
|
||||
|
||||
case "Tag.createdAt":
|
||||
if e.complexity.Tag.CreatedAt == nil {
|
||||
@@ -1032,10 +1037,11 @@ type Tag {
|
||||
}
|
||||
|
||||
type Album {
|
||||
id: ID! @meta(gorm: "primaryKey;not null")
|
||||
id: ID! @meta(gorm: "primaryKey;not null")
|
||||
createdAt: Time
|
||||
updatedAt: Time
|
||||
name: String! @meta(gorm: "unique;not null")
|
||||
name: String! @meta(gorm: "unique;not null")
|
||||
# userID: ID! @meta(gorm: "not null")
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
@@ -1171,49 +1177,68 @@ type AlbumResponse {
|
||||
# ------------------------------------------------------------
|
||||
|
||||
type Query {
|
||||
|
||||
# Authentication
|
||||
login(
|
||||
user: String!
|
||||
password: String!
|
||||
deviceID: ID
|
||||
): AuthResponse!
|
||||
logout: AuthResponse! @hasMinRole(role: User)
|
||||
logout: AuthResponse! @hasMinRole(role: User)
|
||||
|
||||
# Single Item
|
||||
mediaItem(id: ID!): MediaItem! @hasMinRole(role: User)
|
||||
device(id: ID!): Device! @hasMinRole(role: User)
|
||||
album(id: ID!): Album! @hasMinRole(role: User)
|
||||
user(id: ID!): User! @hasMinRole(role: Admin)
|
||||
tag(id: ID!): Tag! @hasMinRole(role: User)
|
||||
me: User! @hasMinRole(role: User)
|
||||
mediaItem(
|
||||
id: ID!
|
||||
delete: Boolean
|
||||
): MediaItem! @hasMinRole(role: User)
|
||||
device(
|
||||
id: ID!
|
||||
delete: Boolean
|
||||
): Device! @hasMinRole(role: User)
|
||||
album(
|
||||
id: ID!
|
||||
delete: Boolean
|
||||
): Album! @hasMinRole(role: User)
|
||||
user(
|
||||
id: ID!
|
||||
delete: Boolean
|
||||
): User! @hasMinRole(role: Admin) # TODO: Delete All User Content
|
||||
tag(
|
||||
id: ID!
|
||||
delete: Boolean
|
||||
): Tag! @hasMinRole(role: User)
|
||||
me(delete: Boolean): User! @hasMinRole(role: User)
|
||||
|
||||
# All
|
||||
mediaItems(
|
||||
delete: Boolean
|
||||
filter: MediaItemFilter
|
||||
count: Int
|
||||
page: Int
|
||||
): MediaItemResponse! @hasMinRole(role: User)
|
||||
devices(
|
||||
delete: Boolean
|
||||
filter: DeviceFilter
|
||||
count: Int
|
||||
page: Int
|
||||
): DeviceResponse! @hasMinRole(role: User)
|
||||
albums(
|
||||
delete: Boolean
|
||||
filter: AlbumFilter
|
||||
count: Int
|
||||
page: Int
|
||||
): AlbumResponse! @hasMinRole(role: User)
|
||||
tags(
|
||||
delete: Boolean
|
||||
filter: TagFilter
|
||||
count: Int
|
||||
page: Int
|
||||
): TagResponse! @hasMinRole(role: User)
|
||||
users(
|
||||
delete: Boolean
|
||||
filter: UserFilter
|
||||
count: Int
|
||||
page: Int
|
||||
): UserResponse! @hasMinRole(role: Admin)
|
||||
): UserResponse! @hasMinRole(role: Admin) # TODO: Delete All User Content
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
@@ -1347,39 +1372,57 @@ func (ec *executionContext) field_Query_album_args(ctx context.Context, rawArgs
|
||||
}
|
||||
}
|
||||
args["id"] = arg0
|
||||
var arg1 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg1
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_albums_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 *model.AlbumFilter
|
||||
var arg0 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg0
|
||||
var arg1 *model.AlbumFilter
|
||||
if tmp, ok := rawArgs["filter"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
||||
arg0, err = ec.unmarshalOAlbumFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbumFilter(ctx, tmp)
|
||||
arg1, err = ec.unmarshalOAlbumFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbumFilter(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["filter"] = arg0
|
||||
var arg1 *int
|
||||
args["filter"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["count"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("count"))
|
||||
arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["count"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg2
|
||||
args["count"] = arg2
|
||||
var arg3 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg3
|
||||
return args, nil
|
||||
}
|
||||
|
||||
@@ -1395,39 +1438,57 @@ func (ec *executionContext) field_Query_device_args(ctx context.Context, rawArgs
|
||||
}
|
||||
}
|
||||
args["id"] = arg0
|
||||
var arg1 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg1
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_devices_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 *model.DeviceFilter
|
||||
var arg0 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg0
|
||||
var arg1 *model.DeviceFilter
|
||||
if tmp, ok := rawArgs["filter"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
||||
arg0, err = ec.unmarshalODeviceFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceFilter(ctx, tmp)
|
||||
arg1, err = ec.unmarshalODeviceFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceFilter(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["filter"] = arg0
|
||||
var arg1 *int
|
||||
args["filter"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["count"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("count"))
|
||||
arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["count"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg2
|
||||
args["count"] = arg2
|
||||
var arg3 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg3
|
||||
return args, nil
|
||||
}
|
||||
|
||||
@@ -1464,6 +1525,21 @@ func (ec *executionContext) field_Query_login_args(ctx context.Context, rawArgs
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_me_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg0
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_mediaItem_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
@@ -1476,39 +1552,57 @@ func (ec *executionContext) field_Query_mediaItem_args(ctx context.Context, rawA
|
||||
}
|
||||
}
|
||||
args["id"] = arg0
|
||||
var arg1 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg1
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_mediaItems_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 *model.MediaItemFilter
|
||||
var arg0 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg0
|
||||
var arg1 *model.MediaItemFilter
|
||||
if tmp, ok := rawArgs["filter"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
||||
arg0, err = ec.unmarshalOMediaItemFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItemFilter(ctx, tmp)
|
||||
arg1, err = ec.unmarshalOMediaItemFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItemFilter(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["filter"] = arg0
|
||||
var arg1 *int
|
||||
args["filter"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["count"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("count"))
|
||||
arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["count"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg2
|
||||
args["count"] = arg2
|
||||
var arg3 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg3
|
||||
return args, nil
|
||||
}
|
||||
|
||||
@@ -1524,39 +1618,57 @@ func (ec *executionContext) field_Query_tag_args(ctx context.Context, rawArgs ma
|
||||
}
|
||||
}
|
||||
args["id"] = arg0
|
||||
var arg1 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg1
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_tags_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 *model.TagFilter
|
||||
var arg0 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg0
|
||||
var arg1 *model.TagFilter
|
||||
if tmp, ok := rawArgs["filter"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
||||
arg0, err = ec.unmarshalOTagFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTagFilter(ctx, tmp)
|
||||
arg1, err = ec.unmarshalOTagFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTagFilter(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["filter"] = arg0
|
||||
var arg1 *int
|
||||
args["filter"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["count"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("count"))
|
||||
arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["count"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg2
|
||||
args["count"] = arg2
|
||||
var arg3 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg3
|
||||
return args, nil
|
||||
}
|
||||
|
||||
@@ -1572,39 +1684,57 @@ func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs m
|
||||
}
|
||||
}
|
||||
args["id"] = arg0
|
||||
var arg1 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg1
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_users_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 *model.UserFilter
|
||||
var arg0 *bool
|
||||
if tmp, ok := rawArgs["delete"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("delete"))
|
||||
arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["delete"] = arg0
|
||||
var arg1 *model.UserFilter
|
||||
if tmp, ok := rawArgs["filter"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
||||
arg0, err = ec.unmarshalOUserFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUserFilter(ctx, tmp)
|
||||
arg1, err = ec.unmarshalOUserFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUserFilter(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["filter"] = arg0
|
||||
var arg1 *int
|
||||
args["filter"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["count"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("count"))
|
||||
arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["count"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg2
|
||||
args["count"] = arg2
|
||||
var arg3 *int
|
||||
if tmp, ok := rawArgs["page"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
||||
arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["page"] = arg3
|
||||
return args, nil
|
||||
}
|
||||
|
||||
@@ -3543,7 +3673,7 @@ func (ec *executionContext) _Query_mediaItem(ctx context.Context, field graphql.
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().MediaItem(rctx, args["id"].(string))
|
||||
return ec.resolvers.Query().MediaItem(rctx, args["id"].(string), args["delete"].(*bool))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
||||
@@ -3609,7 +3739,7 @@ func (ec *executionContext) _Query_device(ctx context.Context, field graphql.Col
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().Device(rctx, args["id"].(string))
|
||||
return ec.resolvers.Query().Device(rctx, args["id"].(string), args["delete"].(*bool))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
||||
@@ -3675,7 +3805,7 @@ func (ec *executionContext) _Query_album(ctx context.Context, field graphql.Coll
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().Album(rctx, args["id"].(string))
|
||||
return ec.resolvers.Query().Album(rctx, args["id"].(string), args["delete"].(*bool))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
||||
@@ -3741,7 +3871,7 @@ func (ec *executionContext) _Query_user(ctx context.Context, field graphql.Colle
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().User(rctx, args["id"].(string))
|
||||
return ec.resolvers.Query().User(rctx, args["id"].(string), args["delete"].(*bool))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "Admin")
|
||||
@@ -3807,7 +3937,7 @@ func (ec *executionContext) _Query_tag(ctx context.Context, field graphql.Collec
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().Tag(rctx, args["id"].(string))
|
||||
return ec.resolvers.Query().Tag(rctx, args["id"].(string), args["delete"].(*bool))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
||||
@@ -3863,10 +3993,17 @@ func (ec *executionContext) _Query_me(ctx context.Context, field graphql.Collect
|
||||
}
|
||||
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
rawArgs := field.ArgumentMap(ec.Variables)
|
||||
args, err := ec.field_Query_me_args(ctx, rawArgs)
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
fc.Args = args
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().Me(rctx)
|
||||
return ec.resolvers.Query().Me(rctx, args["delete"].(*bool))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
||||
@@ -3932,7 +4069,7 @@ func (ec *executionContext) _Query_mediaItems(ctx context.Context, field graphql
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().MediaItems(rctx, args["filter"].(*model.MediaItemFilter), args["count"].(*int), args["page"].(*int))
|
||||
return ec.resolvers.Query().MediaItems(rctx, args["delete"].(*bool), args["filter"].(*model.MediaItemFilter), args["count"].(*int), args["page"].(*int))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
||||
@@ -3998,7 +4135,7 @@ func (ec *executionContext) _Query_devices(ctx context.Context, field graphql.Co
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().Devices(rctx, args["filter"].(*model.DeviceFilter), args["count"].(*int), args["page"].(*int))
|
||||
return ec.resolvers.Query().Devices(rctx, args["delete"].(*bool), args["filter"].(*model.DeviceFilter), args["count"].(*int), args["page"].(*int))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
||||
@@ -4064,7 +4201,7 @@ func (ec *executionContext) _Query_albums(ctx context.Context, field graphql.Col
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().Albums(rctx, args["filter"].(*model.AlbumFilter), args["count"].(*int), args["page"].(*int))
|
||||
return ec.resolvers.Query().Albums(rctx, args["delete"].(*bool), args["filter"].(*model.AlbumFilter), args["count"].(*int), args["page"].(*int))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
||||
@@ -4130,7 +4267,7 @@ func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.Colle
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().Tags(rctx, args["filter"].(*model.TagFilter), args["count"].(*int), args["page"].(*int))
|
||||
return ec.resolvers.Query().Tags(rctx, args["delete"].(*bool), args["filter"].(*model.TagFilter), args["count"].(*int), args["page"].(*int))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
||||
@@ -4196,7 +4333,7 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
directive0 := func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().Users(rctx, args["filter"].(*model.UserFilter), args["count"].(*int), args["page"].(*int))
|
||||
return ec.resolvers.Query().Users(rctx, args["delete"].(*bool), args["filter"].(*model.UserFilter), args["count"].(*int), args["page"].(*int))
|
||||
}
|
||||
directive1 := func(ctx context.Context) (interface{}, error) {
|
||||
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "Admin")
|
||||
|
||||
Reference in New Issue
Block a user