9713 lines
267 KiB
Go
9713 lines
267 KiB
Go
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
|
|
|
package generated
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"errors"
|
|
"fmt"
|
|
"strconv"
|
|
"sync"
|
|
"sync/atomic"
|
|
"time"
|
|
|
|
"github.com/99designs/gqlgen/graphql"
|
|
"github.com/99designs/gqlgen/graphql/introspection"
|
|
gqlparser "github.com/vektah/gqlparser/v2"
|
|
"github.com/vektah/gqlparser/v2/ast"
|
|
"reichard.io/imagini/graph/model"
|
|
)
|
|
|
|
// region ************************** generated!.gotpl **************************
|
|
|
|
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
|
|
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
|
|
return &executableSchema{
|
|
resolvers: cfg.Resolvers,
|
|
directives: cfg.Directives,
|
|
complexity: cfg.Complexity,
|
|
}
|
|
}
|
|
|
|
type Config struct {
|
|
Resolvers ResolverRoot
|
|
Directives DirectiveRoot
|
|
Complexity ComplexityRoot
|
|
}
|
|
|
|
type ResolverRoot interface {
|
|
Mutation() MutationResolver
|
|
Query() QueryResolver
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
type ComplexityRoot struct {
|
|
Album struct {
|
|
CreatedAt func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
UpdatedAt func(childComplexity int) int
|
|
UserID func(childComplexity int) int
|
|
}
|
|
|
|
AlbumResponse struct {
|
|
Data func(childComplexity int) int
|
|
Page func(childComplexity int) int
|
|
}
|
|
|
|
AuthResponse struct {
|
|
Device func(childComplexity int) int
|
|
Error func(childComplexity int) int
|
|
Result func(childComplexity int) int
|
|
}
|
|
|
|
Device struct {
|
|
CreatedAt func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
RefreshKey func(childComplexity int) int
|
|
Type func(childComplexity int) int
|
|
UpdatedAt func(childComplexity int) int
|
|
UserID func(childComplexity int) int
|
|
}
|
|
|
|
DeviceResponse struct {
|
|
Data func(childComplexity int) int
|
|
Page func(childComplexity int) int
|
|
}
|
|
|
|
MediaItem struct {
|
|
Albums func(childComplexity int) int
|
|
CreatedAt func(childComplexity int) int
|
|
ExifDate func(childComplexity int) int
|
|
FileName func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
IsVideo func(childComplexity int) int
|
|
Latitude func(childComplexity int) int
|
|
Longitude func(childComplexity int) int
|
|
OrigName func(childComplexity int) int
|
|
Tags func(childComplexity int) int
|
|
UpdatedAt func(childComplexity int) int
|
|
UserID func(childComplexity int) int
|
|
}
|
|
|
|
MediaItemResponse struct {
|
|
Data func(childComplexity int) int
|
|
Page func(childComplexity int) int
|
|
}
|
|
|
|
Mutation struct {
|
|
CreateAlbum func(childComplexity int, input model.NewAlbum) int
|
|
CreateMediaItem func(childComplexity int, input model.NewMediaItem) int
|
|
CreateTag func(childComplexity int, input model.NewTag) int
|
|
CreateUser func(childComplexity int, input model.NewUser) int
|
|
}
|
|
|
|
PageResponse struct {
|
|
Page func(childComplexity int) int
|
|
Size func(childComplexity int) int
|
|
Total func(childComplexity int) int
|
|
}
|
|
|
|
Query struct {
|
|
Album func(childComplexity int, id string) int
|
|
Albums func(childComplexity int, filter *model.AlbumFilter, page *model.Page, order *model.Order) int
|
|
Device func(childComplexity int, id string) int
|
|
Devices func(childComplexity int, filter *model.DeviceFilter, page *model.Page, order *model.Order) 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, page *model.Page, order *model.Order) int
|
|
Tag func(childComplexity int, id string) int
|
|
Tags func(childComplexity int, filter *model.TagFilter, page *model.Page, order *model.Order) int
|
|
User func(childComplexity int, id string) int
|
|
Users func(childComplexity int, filter *model.UserFilter, page *model.Page, order *model.Order) int
|
|
}
|
|
|
|
Tag struct {
|
|
CreatedAt func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
UpdatedAt func(childComplexity int) int
|
|
UserID func(childComplexity int) int
|
|
}
|
|
|
|
TagResponse struct {
|
|
Data func(childComplexity int) int
|
|
Page func(childComplexity int) int
|
|
}
|
|
|
|
User struct {
|
|
AuthType func(childComplexity int) int
|
|
CreatedAt func(childComplexity int) int
|
|
Devices func(childComplexity int) int
|
|
Email func(childComplexity int) int
|
|
FirstName func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
LastName func(childComplexity int) int
|
|
MediaItems func(childComplexity int) int
|
|
Password func(childComplexity int) int
|
|
Role func(childComplexity int) int
|
|
UpdatedAt func(childComplexity int) int
|
|
Username func(childComplexity int) int
|
|
}
|
|
|
|
UserResponse struct {
|
|
Data func(childComplexity int) int
|
|
Page func(childComplexity int) int
|
|
}
|
|
}
|
|
|
|
type MutationResolver interface {
|
|
CreateMediaItem(ctx context.Context, input model.NewMediaItem) (*model.MediaItem, error)
|
|
CreateAlbum(ctx context.Context, input model.NewAlbum) (*model.Album, error)
|
|
CreateTag(ctx context.Context, input model.NewTag) (*model.Tag, error)
|
|
CreateUser(ctx context.Context, input model.NewUser) (*model.User, error)
|
|
}
|
|
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, page *model.Page, order *model.Order) (*model.MediaItemResponse, error)
|
|
Devices(ctx context.Context, filter *model.DeviceFilter, page *model.Page, order *model.Order) (*model.DeviceResponse, error)
|
|
Albums(ctx context.Context, filter *model.AlbumFilter, page *model.Page, order *model.Order) (*model.AlbumResponse, error)
|
|
Tags(ctx context.Context, filter *model.TagFilter, page *model.Page, order *model.Order) (*model.TagResponse, error)
|
|
Users(ctx context.Context, filter *model.UserFilter, page *model.Page, order *model.Order) (*model.UserResponse, error)
|
|
}
|
|
|
|
type executableSchema struct {
|
|
resolvers ResolverRoot
|
|
directives DirectiveRoot
|
|
complexity ComplexityRoot
|
|
}
|
|
|
|
func (e *executableSchema) Schema() *ast.Schema {
|
|
return parsedSchema
|
|
}
|
|
|
|
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
|
|
ec := executionContext{nil, e}
|
|
_ = ec
|
|
switch typeName + "." + field {
|
|
|
|
case "Album.createdAt":
|
|
if e.complexity.Album.CreatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Album.CreatedAt(childComplexity), true
|
|
|
|
case "Album.id":
|
|
if e.complexity.Album.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Album.ID(childComplexity), true
|
|
|
|
case "Album.name":
|
|
if e.complexity.Album.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Album.Name(childComplexity), true
|
|
|
|
case "Album.updatedAt":
|
|
if e.complexity.Album.UpdatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Album.UpdatedAt(childComplexity), true
|
|
|
|
case "Album.userID":
|
|
if e.complexity.Album.UserID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Album.UserID(childComplexity), true
|
|
|
|
case "AlbumResponse.data":
|
|
if e.complexity.AlbumResponse.Data == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.AlbumResponse.Data(childComplexity), true
|
|
|
|
case "AlbumResponse.page":
|
|
if e.complexity.AlbumResponse.Page == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.AlbumResponse.Page(childComplexity), true
|
|
|
|
case "AuthResponse.device":
|
|
if e.complexity.AuthResponse.Device == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.AuthResponse.Device(childComplexity), true
|
|
|
|
case "AuthResponse.error":
|
|
if e.complexity.AuthResponse.Error == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.AuthResponse.Error(childComplexity), true
|
|
|
|
case "AuthResponse.result":
|
|
if e.complexity.AuthResponse.Result == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.AuthResponse.Result(childComplexity), true
|
|
|
|
case "Device.createdAt":
|
|
if e.complexity.Device.CreatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Device.CreatedAt(childComplexity), true
|
|
|
|
case "Device.id":
|
|
if e.complexity.Device.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Device.ID(childComplexity), true
|
|
|
|
case "Device.name":
|
|
if e.complexity.Device.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Device.Name(childComplexity), true
|
|
|
|
case "Device.refreshKey":
|
|
if e.complexity.Device.RefreshKey == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Device.RefreshKey(childComplexity), true
|
|
|
|
case "Device.type":
|
|
if e.complexity.Device.Type == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Device.Type(childComplexity), true
|
|
|
|
case "Device.updatedAt":
|
|
if e.complexity.Device.UpdatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Device.UpdatedAt(childComplexity), true
|
|
|
|
case "Device.userID":
|
|
if e.complexity.Device.UserID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Device.UserID(childComplexity), true
|
|
|
|
case "DeviceResponse.data":
|
|
if e.complexity.DeviceResponse.Data == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.DeviceResponse.Data(childComplexity), true
|
|
|
|
case "DeviceResponse.page":
|
|
if e.complexity.DeviceResponse.Page == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.DeviceResponse.Page(childComplexity), true
|
|
|
|
case "MediaItem.albums":
|
|
if e.complexity.MediaItem.Albums == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.Albums(childComplexity), true
|
|
|
|
case "MediaItem.createdAt":
|
|
if e.complexity.MediaItem.CreatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.CreatedAt(childComplexity), true
|
|
|
|
case "MediaItem.exifDate":
|
|
if e.complexity.MediaItem.ExifDate == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.ExifDate(childComplexity), true
|
|
|
|
case "MediaItem.fileName":
|
|
if e.complexity.MediaItem.FileName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.FileName(childComplexity), true
|
|
|
|
case "MediaItem.id":
|
|
if e.complexity.MediaItem.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.ID(childComplexity), true
|
|
|
|
case "MediaItem.isVideo":
|
|
if e.complexity.MediaItem.IsVideo == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.IsVideo(childComplexity), true
|
|
|
|
case "MediaItem.latitude":
|
|
if e.complexity.MediaItem.Latitude == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.Latitude(childComplexity), true
|
|
|
|
case "MediaItem.longitude":
|
|
if e.complexity.MediaItem.Longitude == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.Longitude(childComplexity), true
|
|
|
|
case "MediaItem.origName":
|
|
if e.complexity.MediaItem.OrigName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.OrigName(childComplexity), true
|
|
|
|
case "MediaItem.tags":
|
|
if e.complexity.MediaItem.Tags == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.Tags(childComplexity), true
|
|
|
|
case "MediaItem.updatedAt":
|
|
if e.complexity.MediaItem.UpdatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.UpdatedAt(childComplexity), true
|
|
|
|
case "MediaItem.userID":
|
|
if e.complexity.MediaItem.UserID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItem.UserID(childComplexity), true
|
|
|
|
case "MediaItemResponse.data":
|
|
if e.complexity.MediaItemResponse.Data == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItemResponse.Data(childComplexity), true
|
|
|
|
case "MediaItemResponse.page":
|
|
if e.complexity.MediaItemResponse.Page == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MediaItemResponse.Page(childComplexity), true
|
|
|
|
case "Mutation.createAlbum":
|
|
if e.complexity.Mutation.CreateAlbum == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_createAlbum_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.CreateAlbum(childComplexity, args["input"].(model.NewAlbum)), true
|
|
|
|
case "Mutation.createMediaItem":
|
|
if e.complexity.Mutation.CreateMediaItem == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_createMediaItem_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.CreateMediaItem(childComplexity, args["input"].(model.NewMediaItem)), true
|
|
|
|
case "Mutation.createTag":
|
|
if e.complexity.Mutation.CreateTag == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_createTag_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.CreateTag(childComplexity, args["input"].(model.NewTag)), true
|
|
|
|
case "Mutation.createUser":
|
|
if e.complexity.Mutation.CreateUser == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_createUser_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.CreateUser(childComplexity, args["input"].(model.NewUser)), true
|
|
|
|
case "PageResponse.page":
|
|
if e.complexity.PageResponse.Page == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PageResponse.Page(childComplexity), true
|
|
|
|
case "PageResponse.size":
|
|
if e.complexity.PageResponse.Size == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PageResponse.Size(childComplexity), true
|
|
|
|
case "PageResponse.total":
|
|
if e.complexity.PageResponse.Total == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PageResponse.Total(childComplexity), true
|
|
|
|
case "Query.album":
|
|
if e.complexity.Query.Album == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_album_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Album(childComplexity, args["id"].(string)), true
|
|
|
|
case "Query.albums":
|
|
if e.complexity.Query.Albums == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_albums_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Albums(childComplexity, args["filter"].(*model.AlbumFilter), args["page"].(*model.Page), args["order"].(*model.Order)), true
|
|
|
|
case "Query.device":
|
|
if e.complexity.Query.Device == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_device_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Device(childComplexity, args["id"].(string)), true
|
|
|
|
case "Query.devices":
|
|
if e.complexity.Query.Devices == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_devices_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Devices(childComplexity, args["filter"].(*model.DeviceFilter), args["page"].(*model.Page), args["order"].(*model.Order)), true
|
|
|
|
case "Query.login":
|
|
if e.complexity.Query.Login == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_login_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Login(childComplexity, args["user"].(string), args["password"].(string), args["deviceID"].(*string)), true
|
|
|
|
case "Query.logout":
|
|
if e.complexity.Query.Logout == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Query.Logout(childComplexity), true
|
|
|
|
case "Query.me":
|
|
if e.complexity.Query.Me == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Query.Me(childComplexity), true
|
|
|
|
case "Query.mediaItem":
|
|
if e.complexity.Query.MediaItem == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_mediaItem_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.MediaItem(childComplexity, args["id"].(string)), true
|
|
|
|
case "Query.mediaItems":
|
|
if e.complexity.Query.MediaItems == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_mediaItems_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.MediaItems(childComplexity, args["filter"].(*model.MediaItemFilter), args["page"].(*model.Page), args["order"].(*model.Order)), true
|
|
|
|
case "Query.tag":
|
|
if e.complexity.Query.Tag == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_tag_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Tag(childComplexity, args["id"].(string)), true
|
|
|
|
case "Query.tags":
|
|
if e.complexity.Query.Tags == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_tags_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Tags(childComplexity, args["filter"].(*model.TagFilter), args["page"].(*model.Page), args["order"].(*model.Order)), true
|
|
|
|
case "Query.user":
|
|
if e.complexity.Query.User == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_user_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.User(childComplexity, args["id"].(string)), true
|
|
|
|
case "Query.users":
|
|
if e.complexity.Query.Users == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_users_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Users(childComplexity, args["filter"].(*model.UserFilter), args["page"].(*model.Page), args["order"].(*model.Order)), true
|
|
|
|
case "Tag.createdAt":
|
|
if e.complexity.Tag.CreatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tag.CreatedAt(childComplexity), true
|
|
|
|
case "Tag.id":
|
|
if e.complexity.Tag.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tag.ID(childComplexity), true
|
|
|
|
case "Tag.name":
|
|
if e.complexity.Tag.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tag.Name(childComplexity), true
|
|
|
|
case "Tag.updatedAt":
|
|
if e.complexity.Tag.UpdatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tag.UpdatedAt(childComplexity), true
|
|
|
|
case "Tag.userID":
|
|
if e.complexity.Tag.UserID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tag.UserID(childComplexity), true
|
|
|
|
case "TagResponse.data":
|
|
if e.complexity.TagResponse.Data == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TagResponse.Data(childComplexity), true
|
|
|
|
case "TagResponse.page":
|
|
if e.complexity.TagResponse.Page == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TagResponse.Page(childComplexity), true
|
|
|
|
case "User.authType":
|
|
if e.complexity.User.AuthType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.AuthType(childComplexity), true
|
|
|
|
case "User.createdAt":
|
|
if e.complexity.User.CreatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.CreatedAt(childComplexity), true
|
|
|
|
case "User.devices":
|
|
if e.complexity.User.Devices == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Devices(childComplexity), true
|
|
|
|
case "User.email":
|
|
if e.complexity.User.Email == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Email(childComplexity), true
|
|
|
|
case "User.firstName":
|
|
if e.complexity.User.FirstName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.FirstName(childComplexity), true
|
|
|
|
case "User.id":
|
|
if e.complexity.User.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.ID(childComplexity), true
|
|
|
|
case "User.lastName":
|
|
if e.complexity.User.LastName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.LastName(childComplexity), true
|
|
|
|
case "User.mediaItems":
|
|
if e.complexity.User.MediaItems == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.MediaItems(childComplexity), true
|
|
|
|
case "User.password":
|
|
if e.complexity.User.Password == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Password(childComplexity), true
|
|
|
|
case "User.role":
|
|
if e.complexity.User.Role == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Role(childComplexity), true
|
|
|
|
case "User.updatedAt":
|
|
if e.complexity.User.UpdatedAt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.UpdatedAt(childComplexity), true
|
|
|
|
case "User.username":
|
|
if e.complexity.User.Username == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Username(childComplexity), true
|
|
|
|
case "UserResponse.data":
|
|
if e.complexity.UserResponse.Data == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.UserResponse.Data(childComplexity), true
|
|
|
|
case "UserResponse.page":
|
|
if e.complexity.UserResponse.Page == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.UserResponse.Page(childComplexity), true
|
|
|
|
}
|
|
return 0, false
|
|
}
|
|
|
|
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
|
|
rc := graphql.GetOperationContext(ctx)
|
|
ec := executionContext{rc, e}
|
|
first := true
|
|
|
|
switch rc.Operation.Operation {
|
|
case ast.Query:
|
|
return func(ctx context.Context) *graphql.Response {
|
|
if !first {
|
|
return nil
|
|
}
|
|
first = false
|
|
data := ec._Query(ctx, rc.Operation.SelectionSet)
|
|
var buf bytes.Buffer
|
|
data.MarshalGQL(&buf)
|
|
|
|
return &graphql.Response{
|
|
Data: buf.Bytes(),
|
|
}
|
|
}
|
|
case ast.Mutation:
|
|
return func(ctx context.Context) *graphql.Response {
|
|
if !first {
|
|
return nil
|
|
}
|
|
first = false
|
|
data := ec._Mutation(ctx, rc.Operation.SelectionSet)
|
|
var buf bytes.Buffer
|
|
data.MarshalGQL(&buf)
|
|
|
|
return &graphql.Response{
|
|
Data: buf.Bytes(),
|
|
}
|
|
}
|
|
|
|
default:
|
|
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
|
|
}
|
|
}
|
|
|
|
type executionContext struct {
|
|
*graphql.OperationContext
|
|
*executableSchema
|
|
}
|
|
|
|
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
|
|
if ec.DisableIntrospection {
|
|
return nil, errors.New("introspection disabled")
|
|
}
|
|
return introspection.WrapSchema(parsedSchema), nil
|
|
}
|
|
|
|
func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
|
|
if ec.DisableIntrospection {
|
|
return nil, errors.New("introspection disabled")
|
|
}
|
|
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
|
|
}
|
|
|
|
var sources = []*ast.Source{
|
|
{Name: "graph/schema.graphqls", Input: `
|
|
# https://gqlgen.com/reference/scalars/
|
|
scalar Time
|
|
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,
|
|
) on OBJECT | FIELD_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION | ENUM | INPUT_OBJECT | ARGUMENT_DEFINITION
|
|
|
|
enum Role {
|
|
Admin
|
|
User
|
|
}
|
|
|
|
enum DeviceType {
|
|
iOS
|
|
Android
|
|
Chrome
|
|
Firefox
|
|
InternetExplorer
|
|
Edge
|
|
Safari
|
|
Unknown
|
|
}
|
|
|
|
enum AuthType {
|
|
Local
|
|
LDAP
|
|
}
|
|
|
|
enum OrderDirection {
|
|
ASC
|
|
DESC
|
|
}
|
|
|
|
# ------------------------------------------------------------
|
|
# ---------------------- Authentication ----------------------
|
|
# ------------------------------------------------------------
|
|
|
|
enum AuthResult {
|
|
Success
|
|
Failure
|
|
}
|
|
|
|
type AuthResponse {
|
|
result: AuthResult!
|
|
device: Device
|
|
error: String
|
|
}
|
|
|
|
# ------------------------------------------------------------
|
|
# ----------------------- Type Filters -----------------------
|
|
# ------------------------------------------------------------
|
|
|
|
input TimeFilter {
|
|
equalTo: Time
|
|
notEqualTo: Time
|
|
lessThan: Time
|
|
lessThanOrEqualTo: Time
|
|
greaterThan: Time
|
|
greaterThanOrEqualTo: Time
|
|
}
|
|
|
|
input IntFilter {
|
|
equalTo: Int
|
|
notEqualTo: Int
|
|
lessThan: Int
|
|
lessThanOrEqualTo: Int
|
|
greaterThan: Int
|
|
greaterThanOrEqualTo: Int
|
|
}
|
|
|
|
input FloatFilter {
|
|
equalTo: Float
|
|
notEqualTo: Float
|
|
lessThan: Float
|
|
lessThanOrEqualTo: Float
|
|
greaterThan: Float
|
|
greaterThanOrEqualTo: Float
|
|
}
|
|
|
|
input BooleanFilter {
|
|
equalTo: Boolean
|
|
notEqualTo: Boolean
|
|
}
|
|
|
|
input IDFilter {
|
|
equalTo: ID
|
|
notEqualTo: ID
|
|
}
|
|
|
|
input StringFilter {
|
|
equalTo: String
|
|
notEqualTo: String
|
|
startsWith: String
|
|
notStartsWith: String
|
|
endsWith: String
|
|
notEndsWith: String
|
|
contains: String
|
|
notContains: String
|
|
}
|
|
|
|
input RoleFilter {
|
|
equalTo: Role
|
|
notEqualTo: Role
|
|
}
|
|
|
|
input DeviceTypeFilter {
|
|
equalTo: DeviceType
|
|
notEqualTo: DeviceType
|
|
}
|
|
|
|
input AuthTypeFilter {
|
|
equalTo: AuthType
|
|
notEqualTo: AuthType
|
|
}
|
|
|
|
# ------------------------------------------------------------
|
|
# -------------------- Object Definitions --------------------
|
|
# ------------------------------------------------------------
|
|
|
|
type User {
|
|
id: ID! @meta(gorm: "primaryKey;not null")
|
|
createdAt: Time
|
|
updatedAt: Time
|
|
email: String! @meta(gorm: "not null;unique")
|
|
username: String! @meta(gorm: "not null;unique")
|
|
firstName: String
|
|
lastName: String
|
|
role: Role! @meta(gorm: "default:User;not null")
|
|
authType: AuthType! @meta(gorm: "default:Local;not null")
|
|
password: String @isPrivate
|
|
devices: [Device!] @meta(gorm: "foreignKey:UserID")
|
|
mediaItems: [MediaItem!] @meta(gorm: "foreignKey:UserID")
|
|
}
|
|
|
|
type Device {
|
|
id: ID! @meta(gorm: "primaryKey;not null")
|
|
createdAt: Time
|
|
updatedAt: Time
|
|
name: String! @meta(gorm: "not null")
|
|
type: DeviceType! @meta(gorm: "default:Unknown;not null")
|
|
refreshKey: String @isPrivate
|
|
userID: ID! @meta(gorm: "not null")
|
|
}
|
|
|
|
type MediaItem {
|
|
id: ID! @meta(gorm: "primaryKey;not null")
|
|
createdAt: Time
|
|
updatedAt: Time
|
|
exifDate: Time
|
|
latitude: Float @meta(gorm: "precision:5")
|
|
longitude: Float @meta(gorm: "precision:5")
|
|
isVideo: Boolean! @meta(gorm: "default:false;not null")
|
|
fileName: String! @meta(gorm: "not null")
|
|
origName: String! @meta(gorm: "not null")
|
|
tags: [Tag] @meta(gorm: "many2many:media_tags;foreignKey:ID,UserID;References:ID")
|
|
albums: [Album] @meta(gorm: "many2many:media_albums;foreignKey:ID,UserID;Refrences:ID")
|
|
userID: ID! @meta(gorm: "not null")
|
|
}
|
|
|
|
type Tag {
|
|
id: ID! @meta(gorm: "primaryKey;not null")
|
|
createdAt: Time
|
|
updatedAt: Time
|
|
name: String! @meta(gorm: "unique;not null")
|
|
userID: ID! @meta(gorm: "not null")
|
|
}
|
|
|
|
type Album {
|
|
id: ID! @meta(gorm: "primaryKey;not null")
|
|
createdAt: Time
|
|
updatedAt: Time
|
|
name: String! @meta(gorm: "unique;not null")
|
|
userID: ID! @meta(gorm: "not null")
|
|
}
|
|
|
|
# ------------------------------------------------------------
|
|
# ---------------------- Object Filters ----------------------
|
|
# ------------------------------------------------------------
|
|
|
|
input UserFilter {
|
|
id: IDFilter
|
|
createdAt: TimeFilter
|
|
updatedAt: TimeFilter
|
|
username: StringFilter
|
|
firstName: StringFilter
|
|
lastName: StringFilter
|
|
role: RoleFilter
|
|
authType: AuthTypeFilter
|
|
|
|
# and: UserFilter
|
|
# or: UserFilter
|
|
}
|
|
|
|
input MediaItemFilter {
|
|
id: IDFilter
|
|
createdAt: TimeFilter
|
|
updatedAt: TimeFilter
|
|
exifDate: TimeFilter
|
|
latitude: FloatFilter
|
|
longitude: FloatFilter
|
|
isVideo: BooleanFilter
|
|
origName: StringFilter
|
|
tags: TagFilter
|
|
albums: AlbumFilter
|
|
|
|
# and: MediaItemFilter
|
|
# or: MediaItemFilter
|
|
}
|
|
|
|
input DeviceFilter {
|
|
id: IDFilter
|
|
createdAt: TimeFilter
|
|
updatedAt: TimeFilter
|
|
name: StringFilter
|
|
type: DeviceTypeFilter
|
|
|
|
# and: MediaItemFilter
|
|
# or: MediaItemFilter
|
|
}
|
|
|
|
input TagFilter {
|
|
id: IDFilter
|
|
createdAt: TimeFilter
|
|
updatedAt: TimeFilter
|
|
name: StringFilter
|
|
|
|
# and: MediaItemFilter
|
|
# or: MediaItemFilter
|
|
}
|
|
|
|
input AlbumFilter {
|
|
id: IDFilter
|
|
createdAt: TimeFilter
|
|
updatedAt: TimeFilter
|
|
name: StringFilter
|
|
|
|
# and: MediaItemFilter
|
|
# or: MediaItemFilter
|
|
}
|
|
|
|
# ------------------------------------------------------------
|
|
# -------------------------- Inputs --------------------------
|
|
# ------------------------------------------------------------
|
|
|
|
input NewUser {
|
|
email: String!
|
|
username: String!
|
|
firstName: String
|
|
lastName: String
|
|
role: Role!
|
|
authType: AuthType!
|
|
password: String
|
|
}
|
|
|
|
input NewMediaItem {
|
|
file: Upload!
|
|
tags: [ID!]
|
|
albums: [ID!]
|
|
}
|
|
|
|
input NewTag {
|
|
name: String!
|
|
}
|
|
|
|
input NewAlbum {
|
|
name: String!
|
|
}
|
|
|
|
input Page {
|
|
size: Int
|
|
page: Int
|
|
}
|
|
|
|
input Order {
|
|
by: String
|
|
direction: OrderDirection
|
|
}
|
|
|
|
# ------------------------------------------------------------
|
|
# ------------------------ Responses -------------------------
|
|
# ------------------------------------------------------------
|
|
|
|
type PageResponse {
|
|
size: Int!
|
|
page: Int!
|
|
total: Int!
|
|
}
|
|
|
|
type MediaItemResponse {
|
|
data: [MediaItem]
|
|
page: PageResponse!
|
|
}
|
|
|
|
type UserResponse {
|
|
data: [User]
|
|
page: PageResponse!
|
|
}
|
|
|
|
type DeviceResponse {
|
|
data: [Device]
|
|
page: PageResponse!
|
|
}
|
|
|
|
type TagResponse {
|
|
data: [Tag]
|
|
page: PageResponse!
|
|
}
|
|
|
|
type AlbumResponse {
|
|
data: [Album]
|
|
page: PageResponse!
|
|
}
|
|
|
|
# ------------------------------------------------------------
|
|
# --------------------- Query & Mutations --------------------
|
|
# ------------------------------------------------------------
|
|
|
|
type Query {
|
|
# Authentication
|
|
login(
|
|
user: String!
|
|
password: String!
|
|
deviceID: ID
|
|
): AuthResponse!
|
|
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)
|
|
|
|
# All
|
|
mediaItems(
|
|
filter: MediaItemFilter
|
|
page: Page
|
|
order: Order
|
|
): MediaItemResponse! @hasMinRole(role: User)
|
|
devices(
|
|
filter: DeviceFilter
|
|
page: Page
|
|
order: Order
|
|
): DeviceResponse! @hasMinRole(role: User)
|
|
albums(
|
|
filter: AlbumFilter
|
|
page: Page
|
|
order: Order
|
|
): AlbumResponse! @hasMinRole(role: User)
|
|
tags(
|
|
filter: TagFilter
|
|
page: Page
|
|
order: Order
|
|
): TagResponse! @hasMinRole(role: User)
|
|
users(
|
|
filter: UserFilter
|
|
page: Page
|
|
order: Order
|
|
): UserResponse! @hasMinRole(role: Admin)
|
|
}
|
|
|
|
type Mutation {
|
|
createMediaItem(input: NewMediaItem!): MediaItem! @hasMinRole(role: User)
|
|
createAlbum(input: NewAlbum!): Album! @hasMinRole(role: User)
|
|
createTag(input: NewTag!): Tag! @hasMinRole(role: User)
|
|
createUser(input: NewUser!): User! @hasMinRole(role: Admin)
|
|
}
|
|
`, BuiltIn: false},
|
|
}
|
|
var parsedSchema = gqlparser.MustLoadSchema(sources...)
|
|
|
|
// endregion ************************** generated!.gotpl **************************
|
|
|
|
// region ***************************** args.gotpl *****************************
|
|
|
|
func (ec *executionContext) dir_hasMinRole_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 model.Role
|
|
if tmp, ok := rawArgs["role"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("role"))
|
|
arg0, err = ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["role"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) dir_meta_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *string
|
|
if tmp, ok := rawArgs["gorm"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gorm"))
|
|
arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["gorm"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_createAlbum_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 model.NewAlbum
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg0, err = ec.unmarshalNNewAlbum2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐNewAlbum(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_createMediaItem_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 model.NewMediaItem
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg0, err = ec.unmarshalNNewMediaItem2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐNewMediaItem(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_createTag_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 model.NewTag
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg0, err = ec.unmarshalNNewTag2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐNewTag(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_createUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 model.NewUser
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg0, err = ec.unmarshalNNewUser2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐNewUser(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["name"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["name"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_album_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
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
|
|
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)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["filter"] = arg0
|
|
var arg1 *model.Page
|
|
if tmp, ok := rawArgs["page"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
|
arg1, err = ec.unmarshalOPage2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPage(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["page"] = arg1
|
|
var arg2 *model.Order
|
|
if tmp, ok := rawArgs["order"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
|
|
arg2, err = ec.unmarshalOOrder2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐOrder(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["order"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_device_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
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
|
|
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)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["filter"] = arg0
|
|
var arg1 *model.Page
|
|
if tmp, ok := rawArgs["page"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
|
arg1, err = ec.unmarshalOPage2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPage(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["page"] = arg1
|
|
var arg2 *model.Order
|
|
if tmp, ok := rawArgs["order"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
|
|
arg2, err = ec.unmarshalOOrder2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐOrder(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["order"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_login_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["user"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("user"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["user"] = arg0
|
|
var arg1 string
|
|
if tmp, ok := rawArgs["password"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
|
|
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["password"] = arg1
|
|
var arg2 *string
|
|
if tmp, ok := rawArgs["deviceID"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceID"))
|
|
arg2, err = ec.unmarshalOID2ᚖstring(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["deviceID"] = arg2
|
|
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{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
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
|
|
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)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["filter"] = arg0
|
|
var arg1 *model.Page
|
|
if tmp, ok := rawArgs["page"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
|
arg1, err = ec.unmarshalOPage2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPage(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["page"] = arg1
|
|
var arg2 *model.Order
|
|
if tmp, ok := rawArgs["order"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
|
|
arg2, err = ec.unmarshalOOrder2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐOrder(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["order"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_tag_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
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
|
|
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)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["filter"] = arg0
|
|
var arg1 *model.Page
|
|
if tmp, ok := rawArgs["page"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
|
arg1, err = ec.unmarshalOPage2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPage(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["page"] = arg1
|
|
var arg2 *model.Order
|
|
if tmp, ok := rawArgs["order"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
|
|
arg2, err = ec.unmarshalOOrder2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐOrder(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["order"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
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
|
|
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)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["filter"] = arg0
|
|
var arg1 *model.Page
|
|
if tmp, ok := rawArgs["page"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
|
arg1, err = ec.unmarshalOPage2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPage(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["page"] = arg1
|
|
var arg2 *model.Order
|
|
if tmp, ok := rawArgs["order"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
|
|
arg2, err = ec.unmarshalOOrder2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐOrder(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["order"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field___Type_enumValues_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["includeDeprecated"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["includeDeprecated"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field___Type_fields_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["includeDeprecated"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["includeDeprecated"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
// endregion ***************************** args.gotpl *****************************
|
|
|
|
// region ************************** directives.gotpl **************************
|
|
|
|
// endregion ************************** directives.gotpl **************************
|
|
|
|
// region **************************** field.gotpl *****************************
|
|
|
|
func (ec *executionContext) _Album_id(ctx context.Context, field graphql.CollectedField, obj *model.Album) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Album",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.ID, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "primaryKey;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Album_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Album) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Album",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CreatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Album_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Album) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Album",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.UpdatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Album_name(ctx context.Context, field graphql.CollectedField, obj *model.Album) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Album",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Name, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "unique;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Album_userID(ctx context.Context, field graphql.CollectedField, obj *model.Album) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Album",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.UserID, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _AlbumResponse_data(ctx context.Context, field graphql.CollectedField, obj *model.AlbumResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "AlbumResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Data, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Album)
|
|
fc.Result = res
|
|
return ec.marshalOAlbum2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbum(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _AlbumResponse_page(ctx context.Context, field graphql.CollectedField, obj *model.AlbumResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "AlbumResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Page, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.PageResponse)
|
|
fc.Result = res
|
|
return ec.marshalNPageResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPageResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
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))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "AuthResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Result, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.AuthResult)
|
|
fc.Result = res
|
|
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) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "AuthResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Device, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Device)
|
|
fc.Result = res
|
|
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) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "AuthResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Error, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Device_id(ctx context.Context, field graphql.CollectedField, obj *model.Device) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Device",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.ID, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "primaryKey;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Device_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Device) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Device",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CreatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Device_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Device) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Device",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.UpdatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Device_name(ctx context.Context, field graphql.CollectedField, obj *model.Device) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Device",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Name, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Device_type(ctx context.Context, field graphql.CollectedField, obj *model.Device) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Device",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Type, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "default:Unknown;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.DeviceType); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be reichard.io/imagini/graph/model.DeviceType`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.DeviceType)
|
|
fc.Result = res
|
|
return ec.marshalNDeviceType2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Device_refreshKey(ctx context.Context, field graphql.CollectedField, obj *model.Device) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Device",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.RefreshKey, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
if ec.directives.IsPrivate == nil {
|
|
return nil, errors.New("directive isPrivate is not implemented")
|
|
}
|
|
return ec.directives.IsPrivate(ctx, obj, directive0)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Device_userID(ctx context.Context, field graphql.CollectedField, obj *model.Device) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Device",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.UserID, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _DeviceResponse_data(ctx context.Context, field graphql.CollectedField, obj *model.DeviceResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "DeviceResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Data, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Device)
|
|
fc.Result = res
|
|
return ec.marshalODevice2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDevice(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _DeviceResponse_page(ctx context.Context, field graphql.CollectedField, obj *model.DeviceResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "DeviceResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Page, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.PageResponse)
|
|
fc.Result = res
|
|
return ec.marshalNPageResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPageResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_id(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.ID, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "primaryKey;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CreatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.UpdatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_exifDate(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ExifDate, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_latitude(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Latitude, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "precision:5")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*float64); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *float64`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*float64)
|
|
fc.Result = res
|
|
return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_longitude(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Longitude, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "precision:5")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*float64); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *float64`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*float64)
|
|
fc.Result = res
|
|
return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_isVideo(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.IsVideo, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "default:false;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(bool); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_fileName(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.FileName, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_origName(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.OrigName, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_tags(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Tags, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "many2many:media_tags;foreignKey:ID,UserID;References:ID")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.([]*model.Tag); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*reichard.io/imagini/graph/model.Tag`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Tag)
|
|
fc.Result = res
|
|
return ec.marshalOTag2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTag(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_albums(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Albums, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "many2many:media_albums;foreignKey:ID,UserID;Refrences:ID")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.([]*model.Album); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*reichard.io/imagini/graph/model.Album`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Album)
|
|
fc.Result = res
|
|
return ec.marshalOAlbum2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbum(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItem_userID(ctx context.Context, field graphql.CollectedField, obj *model.MediaItem) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItem",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.UserID, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItemResponse_data(ctx context.Context, field graphql.CollectedField, obj *model.MediaItemResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItemResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Data, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.MediaItem)
|
|
fc.Result = res
|
|
return ec.marshalOMediaItem2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItem(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MediaItemResponse_page(ctx context.Context, field graphql.CollectedField, obj *model.MediaItemResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MediaItemResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Page, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.PageResponse)
|
|
fc.Result = res
|
|
return ec.marshalNPageResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPageResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_createMediaItem(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_createMediaItem_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.Mutation().CreateMediaItem(rctx, args["input"].(model.NewMediaItem))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.MediaItem); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.MediaItem`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MediaItem)
|
|
fc.Result = res
|
|
return ec.marshalNMediaItem2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItem(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_createAlbum(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_createAlbum_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.Mutation().CreateAlbum(rctx, args["input"].(model.NewAlbum))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Album); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.Album`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Album)
|
|
fc.Result = res
|
|
return ec.marshalNAlbum2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbum(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_createTag_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.Mutation().CreateTag(rctx, args["input"].(model.NewTag))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tag); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.Tag`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tag)
|
|
fc.Result = res
|
|
return ec.marshalNTag2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTag(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_createUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_createUser_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.Mutation().CreateUser(rctx, args["input"].(model.NewUser))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "Admin")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.User); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.User`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.User)
|
|
fc.Result = res
|
|
return ec.marshalNUser2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _PageResponse_size(ctx context.Context, field graphql.CollectedField, obj *model.PageResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PageResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Size, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _PageResponse_page(ctx context.Context, field graphql.CollectedField, obj *model.PageResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PageResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Page, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _PageResponse_total(ctx context.Context, field graphql.CollectedField, obj *model.PageResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PageResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Total, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_login(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_login_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) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Login(rctx, args["user"].(string), args["password"].(string), args["deviceID"].(*string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.AuthResponse)
|
|
fc.Result = res
|
|
return ec.marshalNAuthResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_logout(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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().Logout(rctx)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.AuthResponse); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.AuthResponse`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.AuthResponse)
|
|
fc.Result = res
|
|
return ec.marshalNAuthResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_mediaItem(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_mediaItem_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().MediaItem(rctx, args["id"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.MediaItem); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.MediaItem`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MediaItem)
|
|
fc.Result = res
|
|
return ec.marshalNMediaItem2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItem(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_device(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_device_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().Device(rctx, args["id"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Device); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.Device`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Device)
|
|
fc.Result = res
|
|
return ec.marshalNDevice2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDevice(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_album(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_album_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().Album(rctx, args["id"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Album); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.Album`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Album)
|
|
fc.Result = res
|
|
return ec.marshalNAlbum2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbum(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_user_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().User(rctx, args["id"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "Admin")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.User); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.User`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.User)
|
|
fc.Result = res
|
|
return ec.marshalNUser2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_tag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_tag_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().Tag(rctx, args["id"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tag); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.Tag`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tag)
|
|
fc.Result = res
|
|
return ec.marshalNTag2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTag(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_me(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.User); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.User`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.User)
|
|
fc.Result = res
|
|
return ec.marshalNUser2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_mediaItems(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_mediaItems_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().MediaItems(rctx, args["filter"].(*model.MediaItemFilter), args["page"].(*model.Page), args["order"].(*model.Order))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.MediaItemResponse); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.MediaItemResponse`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MediaItemResponse)
|
|
fc.Result = res
|
|
return ec.marshalNMediaItemResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItemResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_devices(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_devices_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().Devices(rctx, args["filter"].(*model.DeviceFilter), args["page"].(*model.Page), args["order"].(*model.Order))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.DeviceResponse); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.DeviceResponse`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.DeviceResponse)
|
|
fc.Result = res
|
|
return ec.marshalNDeviceResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_albums(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_albums_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().Albums(rctx, args["filter"].(*model.AlbumFilter), args["page"].(*model.Page), args["order"].(*model.Order))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.AlbumResponse); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.AlbumResponse`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.AlbumResponse)
|
|
fc.Result = res
|
|
return ec.marshalNAlbumResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbumResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_tags_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().Tags(rctx, args["filter"].(*model.TagFilter), args["page"].(*model.Page), args["order"].(*model.Order))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "User")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TagResponse); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.TagResponse`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TagResponse)
|
|
fc.Result = res
|
|
return ec.marshalNTagResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTagResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_users(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_users_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().Users(rctx, args["filter"].(*model.UserFilter), args["page"].(*model.Page), args["order"].(*model.Order))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
role, err := ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, "Admin")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.HasMinRole == nil {
|
|
return nil, errors.New("directive hasMinRole is not implemented")
|
|
}
|
|
return ec.directives.HasMinRole(ctx, nil, directive0, role)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.UserResponse); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *reichard.io/imagini/graph/model.UserResponse`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.UserResponse)
|
|
fc.Result = res
|
|
return ec.marshalNUserResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUserResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query___type_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) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectType(args["name"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectSchema()
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Schema)
|
|
fc.Result = res
|
|
return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tag_id(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tag",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.ID, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "primaryKey;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tag_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tag",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CreatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tag_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tag",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.UpdatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tag_name(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tag",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Name, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "unique;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tag_userID(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tag",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.UserID, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TagResponse_data(ctx context.Context, field graphql.CollectedField, obj *model.TagResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TagResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Data, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Tag)
|
|
fc.Result = res
|
|
return ec.marshalOTag2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTag(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TagResponse_page(ctx context.Context, field graphql.CollectedField, obj *model.TagResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TagResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Page, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.PageResponse)
|
|
fc.Result = res
|
|
return ec.marshalNPageResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPageResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.ID, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "primaryKey;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CreatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.UpdatedAt, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_email(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Email, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "not null;unique")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_username(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Username, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "not null;unique")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_firstName(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.FirstName, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_lastName(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.LastName, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_role(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Role, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "default:User;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Role); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be reichard.io/imagini/graph/model.Role`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Role)
|
|
fc.Result = res
|
|
return ec.marshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_authType(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.AuthType, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "default:Local;not null")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.AuthType); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be reichard.io/imagini/graph/model.AuthType`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.AuthType)
|
|
fc.Result = res
|
|
return ec.marshalNAuthType2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_password(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Password, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
if ec.directives.IsPrivate == nil {
|
|
return nil, errors.New("directive isPrivate is not implemented")
|
|
}
|
|
return ec.directives.IsPrivate(ctx, obj, directive0)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*string); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_devices(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.Devices, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "foreignKey:UserID")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.([]*model.Device); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*reichard.io/imagini/graph/model.Device`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Device)
|
|
fc.Result = res
|
|
return ec.marshalODevice2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_mediaItems(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
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 obj.MediaItems, nil
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
gorm, err := ec.unmarshalOString2ᚖstring(ctx, "foreignKey:UserID")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Meta == nil {
|
|
return nil, errors.New("directive meta is not implemented")
|
|
}
|
|
return ec.directives.Meta(ctx, obj, directive0, gorm)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.([]*model.MediaItem); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*reichard.io/imagini/graph/model.MediaItem`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.MediaItem)
|
|
fc.Result = res
|
|
return ec.marshalOMediaItem2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItemᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _UserResponse_data(ctx context.Context, field graphql.CollectedField, obj *model.UserResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "UserResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Data, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.User)
|
|
fc.Result = res
|
|
return ec.marshalOUser2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _UserResponse_page(ctx context.Context, field graphql.CollectedField, obj *model.UserResponse) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "UserResponse",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Page, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.PageResponse)
|
|
fc.Result = res
|
|
return ec.marshalNPageResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPageResponse(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Locations, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DefaultValue, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Types(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.QueryType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MutationType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.SubscriptionType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Directives(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Directive)
|
|
fc.Result = res
|
|
return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Kind(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
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.marshalN__TypeKind2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field___Type_fields_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) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Fields(args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Field)
|
|
fc.Result = res
|
|
return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Interfaces(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.PossibleTypes(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field___Type_enumValues_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) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EnumValues(args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.EnumValue)
|
|
fc.Result = res
|
|
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.InputFields(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.OfType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
// endregion **************************** field.gotpl *****************************
|
|
|
|
// region **************************** input.gotpl *****************************
|
|
|
|
func (ec *executionContext) unmarshalInputAlbumFilter(ctx context.Context, obj interface{}) (model.AlbumFilter, error) {
|
|
var it model.AlbumFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "id":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
it.ID, err = ec.unmarshalOIDFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐIDFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "createdAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createdAt"))
|
|
it.CreatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "updatedAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updatedAt"))
|
|
it.UpdatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "name":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
it.Name, err = ec.unmarshalOStringFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐStringFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputAuthTypeFilter(ctx context.Context, obj interface{}) (model.AuthTypeFilter, error) {
|
|
var it model.AuthTypeFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "equalTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("equalTo"))
|
|
it.EqualTo, err = ec.unmarshalOAuthType2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthType(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEqualTo"))
|
|
it.NotEqualTo, err = ec.unmarshalOAuthType2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthType(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputBooleanFilter(ctx context.Context, obj interface{}) (model.BooleanFilter, error) {
|
|
var it model.BooleanFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "equalTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("equalTo"))
|
|
it.EqualTo, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEqualTo"))
|
|
it.NotEqualTo, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputDeviceFilter(ctx context.Context, obj interface{}) (model.DeviceFilter, error) {
|
|
var it model.DeviceFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "id":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
it.ID, err = ec.unmarshalOIDFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐIDFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "createdAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createdAt"))
|
|
it.CreatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "updatedAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updatedAt"))
|
|
it.UpdatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "name":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
it.Name, err = ec.unmarshalOStringFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐStringFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "type":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type"))
|
|
it.Type, err = ec.unmarshalODeviceTypeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceTypeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputDeviceTypeFilter(ctx context.Context, obj interface{}) (model.DeviceTypeFilter, error) {
|
|
var it model.DeviceTypeFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "equalTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("equalTo"))
|
|
it.EqualTo, err = ec.unmarshalODeviceType2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceType(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEqualTo"))
|
|
it.NotEqualTo, err = ec.unmarshalODeviceType2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceType(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputFloatFilter(ctx context.Context, obj interface{}) (model.FloatFilter, error) {
|
|
var it model.FloatFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "equalTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("equalTo"))
|
|
it.EqualTo, err = ec.unmarshalOFloat2ᚖfloat64(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEqualTo"))
|
|
it.NotEqualTo, err = ec.unmarshalOFloat2ᚖfloat64(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "lessThan":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lessThan"))
|
|
it.LessThan, err = ec.unmarshalOFloat2ᚖfloat64(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "lessThanOrEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lessThanOrEqualTo"))
|
|
it.LessThanOrEqualTo, err = ec.unmarshalOFloat2ᚖfloat64(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "greaterThan":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("greaterThan"))
|
|
it.GreaterThan, err = ec.unmarshalOFloat2ᚖfloat64(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "greaterThanOrEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("greaterThanOrEqualTo"))
|
|
it.GreaterThanOrEqualTo, err = ec.unmarshalOFloat2ᚖfloat64(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputIDFilter(ctx context.Context, obj interface{}) (model.IDFilter, error) {
|
|
var it model.IDFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "equalTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("equalTo"))
|
|
it.EqualTo, err = ec.unmarshalOID2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEqualTo"))
|
|
it.NotEqualTo, err = ec.unmarshalOID2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputIntFilter(ctx context.Context, obj interface{}) (model.IntFilter, error) {
|
|
var it model.IntFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "equalTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("equalTo"))
|
|
it.EqualTo, err = ec.unmarshalOInt2ᚖint(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEqualTo"))
|
|
it.NotEqualTo, err = ec.unmarshalOInt2ᚖint(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "lessThan":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lessThan"))
|
|
it.LessThan, err = ec.unmarshalOInt2ᚖint(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "lessThanOrEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lessThanOrEqualTo"))
|
|
it.LessThanOrEqualTo, err = ec.unmarshalOInt2ᚖint(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "greaterThan":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("greaterThan"))
|
|
it.GreaterThan, err = ec.unmarshalOInt2ᚖint(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "greaterThanOrEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("greaterThanOrEqualTo"))
|
|
it.GreaterThanOrEqualTo, err = ec.unmarshalOInt2ᚖint(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputMediaItemFilter(ctx context.Context, obj interface{}) (model.MediaItemFilter, error) {
|
|
var it model.MediaItemFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "id":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
it.ID, err = ec.unmarshalOIDFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐIDFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "createdAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createdAt"))
|
|
it.CreatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "updatedAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updatedAt"))
|
|
it.UpdatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "exifDate":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("exifDate"))
|
|
it.ExifDate, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "latitude":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("latitude"))
|
|
it.Latitude, err = ec.unmarshalOFloatFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐFloatFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "longitude":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("longitude"))
|
|
it.Longitude, err = ec.unmarshalOFloatFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐFloatFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "isVideo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isVideo"))
|
|
it.IsVideo, err = ec.unmarshalOBooleanFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐBooleanFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "origName":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("origName"))
|
|
it.OrigName, err = ec.unmarshalOStringFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐStringFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "tags":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tags"))
|
|
it.Tags, err = ec.unmarshalOTagFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTagFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "albums":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("albums"))
|
|
it.Albums, err = ec.unmarshalOAlbumFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbumFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputNewAlbum(ctx context.Context, obj interface{}) (model.NewAlbum, error) {
|
|
var it model.NewAlbum
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "name":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
it.Name, err = ec.unmarshalNString2string(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputNewMediaItem(ctx context.Context, obj interface{}) (model.NewMediaItem, error) {
|
|
var it model.NewMediaItem
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "file":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("file"))
|
|
it.File, err = ec.unmarshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "tags":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tags"))
|
|
it.Tags, err = ec.unmarshalOID2ᚕstringᚄ(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "albums":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("albums"))
|
|
it.Albums, err = ec.unmarshalOID2ᚕstringᚄ(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputNewTag(ctx context.Context, obj interface{}) (model.NewTag, error) {
|
|
var it model.NewTag
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "name":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
it.Name, err = ec.unmarshalNString2string(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputNewUser(ctx context.Context, obj interface{}) (model.NewUser, error) {
|
|
var it model.NewUser
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "email":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email"))
|
|
it.Email, err = ec.unmarshalNString2string(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "username":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
|
|
it.Username, err = ec.unmarshalNString2string(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "firstName":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("firstName"))
|
|
it.FirstName, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "lastName":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lastName"))
|
|
it.LastName, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "role":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("role"))
|
|
it.Role, err = ec.unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "authType":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("authType"))
|
|
it.AuthType, err = ec.unmarshalNAuthType2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthType(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "password":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
|
|
it.Password, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputOrder(ctx context.Context, obj interface{}) (model.Order, error) {
|
|
var it model.Order
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "by":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("by"))
|
|
it.By, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "direction":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction"))
|
|
it.Direction, err = ec.unmarshalOOrderDirection2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐOrderDirection(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputPage(ctx context.Context, obj interface{}) (model.Page, error) {
|
|
var it model.Page
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "size":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("size"))
|
|
it.Size, err = ec.unmarshalOInt2ᚖint(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "page":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
|
it.Page, err = ec.unmarshalOInt2ᚖint(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputRoleFilter(ctx context.Context, obj interface{}) (model.RoleFilter, error) {
|
|
var it model.RoleFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "equalTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("equalTo"))
|
|
it.EqualTo, err = ec.unmarshalORole2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEqualTo"))
|
|
it.NotEqualTo, err = ec.unmarshalORole2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputStringFilter(ctx context.Context, obj interface{}) (model.StringFilter, error) {
|
|
var it model.StringFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "equalTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("equalTo"))
|
|
it.EqualTo, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEqualTo"))
|
|
it.NotEqualTo, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "startsWith":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("startsWith"))
|
|
it.StartsWith, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notStartsWith":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notStartsWith"))
|
|
it.NotStartsWith, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "endsWith":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("endsWith"))
|
|
it.EndsWith, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEndsWith":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEndsWith"))
|
|
it.NotEndsWith, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "contains":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contains"))
|
|
it.Contains, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notContains":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notContains"))
|
|
it.NotContains, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputTagFilter(ctx context.Context, obj interface{}) (model.TagFilter, error) {
|
|
var it model.TagFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "id":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
it.ID, err = ec.unmarshalOIDFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐIDFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "createdAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createdAt"))
|
|
it.CreatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "updatedAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updatedAt"))
|
|
it.UpdatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "name":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
it.Name, err = ec.unmarshalOStringFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐStringFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputTimeFilter(ctx context.Context, obj interface{}) (model.TimeFilter, error) {
|
|
var it model.TimeFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "equalTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("equalTo"))
|
|
it.EqualTo, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "notEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("notEqualTo"))
|
|
it.NotEqualTo, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "lessThan":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lessThan"))
|
|
it.LessThan, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "lessThanOrEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lessThanOrEqualTo"))
|
|
it.LessThanOrEqualTo, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "greaterThan":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("greaterThan"))
|
|
it.GreaterThan, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "greaterThanOrEqualTo":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("greaterThanOrEqualTo"))
|
|
it.GreaterThanOrEqualTo, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputUserFilter(ctx context.Context, obj interface{}) (model.UserFilter, error) {
|
|
var it model.UserFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "id":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
it.ID, err = ec.unmarshalOIDFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐIDFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "createdAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createdAt"))
|
|
it.CreatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "updatedAt":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updatedAt"))
|
|
it.UpdatedAt, err = ec.unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "username":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
|
|
it.Username, err = ec.unmarshalOStringFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐStringFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "firstName":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("firstName"))
|
|
it.FirstName, err = ec.unmarshalOStringFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐStringFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "lastName":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lastName"))
|
|
it.LastName, err = ec.unmarshalOStringFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐStringFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "role":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("role"))
|
|
it.Role, err = ec.unmarshalORoleFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐRoleFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "authType":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("authType"))
|
|
it.AuthType, err = ec.unmarshalOAuthTypeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthTypeFilter(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
// endregion **************************** input.gotpl *****************************
|
|
|
|
// region ************************** interface.gotpl ***************************
|
|
|
|
// endregion ************************** interface.gotpl ***************************
|
|
|
|
// region **************************** object.gotpl ****************************
|
|
|
|
var albumImplementors = []string{"Album"}
|
|
|
|
func (ec *executionContext) _Album(ctx context.Context, sel ast.SelectionSet, obj *model.Album) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, albumImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Album")
|
|
case "id":
|
|
out.Values[i] = ec._Album_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "createdAt":
|
|
out.Values[i] = ec._Album_createdAt(ctx, field, obj)
|
|
case "updatedAt":
|
|
out.Values[i] = ec._Album_updatedAt(ctx, field, obj)
|
|
case "name":
|
|
out.Values[i] = ec._Album_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "userID":
|
|
out.Values[i] = ec._Album_userID(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var albumResponseImplementors = []string{"AlbumResponse"}
|
|
|
|
func (ec *executionContext) _AlbumResponse(ctx context.Context, sel ast.SelectionSet, obj *model.AlbumResponse) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, albumResponseImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("AlbumResponse")
|
|
case "data":
|
|
out.Values[i] = ec._AlbumResponse_data(ctx, field, obj)
|
|
case "page":
|
|
out.Values[i] = ec._AlbumResponse_page(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var authResponseImplementors = []string{"AuthResponse"}
|
|
|
|
func (ec *executionContext) _AuthResponse(ctx context.Context, sel ast.SelectionSet, obj *model.AuthResponse) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, authResponseImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("AuthResponse")
|
|
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)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var deviceImplementors = []string{"Device"}
|
|
|
|
func (ec *executionContext) _Device(ctx context.Context, sel ast.SelectionSet, obj *model.Device) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, deviceImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Device")
|
|
case "id":
|
|
out.Values[i] = ec._Device_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "createdAt":
|
|
out.Values[i] = ec._Device_createdAt(ctx, field, obj)
|
|
case "updatedAt":
|
|
out.Values[i] = ec._Device_updatedAt(ctx, field, obj)
|
|
case "name":
|
|
out.Values[i] = ec._Device_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "type":
|
|
out.Values[i] = ec._Device_type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "refreshKey":
|
|
out.Values[i] = ec._Device_refreshKey(ctx, field, obj)
|
|
case "userID":
|
|
out.Values[i] = ec._Device_userID(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var deviceResponseImplementors = []string{"DeviceResponse"}
|
|
|
|
func (ec *executionContext) _DeviceResponse(ctx context.Context, sel ast.SelectionSet, obj *model.DeviceResponse) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, deviceResponseImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("DeviceResponse")
|
|
case "data":
|
|
out.Values[i] = ec._DeviceResponse_data(ctx, field, obj)
|
|
case "page":
|
|
out.Values[i] = ec._DeviceResponse_page(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var mediaItemImplementors = []string{"MediaItem"}
|
|
|
|
func (ec *executionContext) _MediaItem(ctx context.Context, sel ast.SelectionSet, obj *model.MediaItem) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mediaItemImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("MediaItem")
|
|
case "id":
|
|
out.Values[i] = ec._MediaItem_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "createdAt":
|
|
out.Values[i] = ec._MediaItem_createdAt(ctx, field, obj)
|
|
case "updatedAt":
|
|
out.Values[i] = ec._MediaItem_updatedAt(ctx, field, obj)
|
|
case "exifDate":
|
|
out.Values[i] = ec._MediaItem_exifDate(ctx, field, obj)
|
|
case "latitude":
|
|
out.Values[i] = ec._MediaItem_latitude(ctx, field, obj)
|
|
case "longitude":
|
|
out.Values[i] = ec._MediaItem_longitude(ctx, field, obj)
|
|
case "isVideo":
|
|
out.Values[i] = ec._MediaItem_isVideo(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "fileName":
|
|
out.Values[i] = ec._MediaItem_fileName(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "origName":
|
|
out.Values[i] = ec._MediaItem_origName(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "tags":
|
|
out.Values[i] = ec._MediaItem_tags(ctx, field, obj)
|
|
case "albums":
|
|
out.Values[i] = ec._MediaItem_albums(ctx, field, obj)
|
|
case "userID":
|
|
out.Values[i] = ec._MediaItem_userID(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var mediaItemResponseImplementors = []string{"MediaItemResponse"}
|
|
|
|
func (ec *executionContext) _MediaItemResponse(ctx context.Context, sel ast.SelectionSet, obj *model.MediaItemResponse) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mediaItemResponseImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("MediaItemResponse")
|
|
case "data":
|
|
out.Values[i] = ec._MediaItemResponse_data(ctx, field, obj)
|
|
case "page":
|
|
out.Values[i] = ec._MediaItemResponse_page(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var mutationImplementors = []string{"Mutation"}
|
|
|
|
func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
|
|
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
})
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Mutation")
|
|
case "createMediaItem":
|
|
out.Values[i] = ec._Mutation_createMediaItem(ctx, field)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "createAlbum":
|
|
out.Values[i] = ec._Mutation_createAlbum(ctx, field)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "createTag":
|
|
out.Values[i] = ec._Mutation_createTag(ctx, field)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "createUser":
|
|
out.Values[i] = ec._Mutation_createUser(ctx, field)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var pageResponseImplementors = []string{"PageResponse"}
|
|
|
|
func (ec *executionContext) _PageResponse(ctx context.Context, sel ast.SelectionSet, obj *model.PageResponse) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, pageResponseImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("PageResponse")
|
|
case "size":
|
|
out.Values[i] = ec._PageResponse_size(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "page":
|
|
out.Values[i] = ec._PageResponse_page(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "total":
|
|
out.Values[i] = ec._PageResponse_total(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var queryImplementors = []string{"Query"}
|
|
|
|
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
|
|
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
Object: "Query",
|
|
})
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Query")
|
|
case "login":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_login(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "logout":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_logout(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "mediaItem":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_mediaItem(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "device":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_device(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "album":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_album(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "user":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_user(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "tag":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_tag(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "me":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_me(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "mediaItems":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_mediaItems(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "devices":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_devices(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "albums":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_albums(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "tags":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_tags(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "users":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_users(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "__type":
|
|
out.Values[i] = ec._Query___type(ctx, field)
|
|
case "__schema":
|
|
out.Values[i] = ec._Query___schema(ctx, field)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var tagImplementors = []string{"Tag"}
|
|
|
|
func (ec *executionContext) _Tag(ctx context.Context, sel ast.SelectionSet, obj *model.Tag) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, tagImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Tag")
|
|
case "id":
|
|
out.Values[i] = ec._Tag_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "createdAt":
|
|
out.Values[i] = ec._Tag_createdAt(ctx, field, obj)
|
|
case "updatedAt":
|
|
out.Values[i] = ec._Tag_updatedAt(ctx, field, obj)
|
|
case "name":
|
|
out.Values[i] = ec._Tag_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "userID":
|
|
out.Values[i] = ec._Tag_userID(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var tagResponseImplementors = []string{"TagResponse"}
|
|
|
|
func (ec *executionContext) _TagResponse(ctx context.Context, sel ast.SelectionSet, obj *model.TagResponse) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, tagResponseImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("TagResponse")
|
|
case "data":
|
|
out.Values[i] = ec._TagResponse_data(ctx, field, obj)
|
|
case "page":
|
|
out.Values[i] = ec._TagResponse_page(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var userImplementors = []string{"User"}
|
|
|
|
func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *model.User) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("User")
|
|
case "id":
|
|
out.Values[i] = ec._User_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "createdAt":
|
|
out.Values[i] = ec._User_createdAt(ctx, field, obj)
|
|
case "updatedAt":
|
|
out.Values[i] = ec._User_updatedAt(ctx, field, obj)
|
|
case "email":
|
|
out.Values[i] = ec._User_email(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "username":
|
|
out.Values[i] = ec._User_username(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "firstName":
|
|
out.Values[i] = ec._User_firstName(ctx, field, obj)
|
|
case "lastName":
|
|
out.Values[i] = ec._User_lastName(ctx, field, obj)
|
|
case "role":
|
|
out.Values[i] = ec._User_role(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "authType":
|
|
out.Values[i] = ec._User_authType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "password":
|
|
out.Values[i] = ec._User_password(ctx, field, obj)
|
|
case "devices":
|
|
out.Values[i] = ec._User_devices(ctx, field, obj)
|
|
case "mediaItems":
|
|
out.Values[i] = ec._User_mediaItems(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var userResponseImplementors = []string{"UserResponse"}
|
|
|
|
func (ec *executionContext) _UserResponse(ctx context.Context, sel ast.SelectionSet, obj *model.UserResponse) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, userResponseImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("UserResponse")
|
|
case "data":
|
|
out.Values[i] = ec._UserResponse_data(ctx, field, obj)
|
|
case "page":
|
|
out.Values[i] = ec._UserResponse_page(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __DirectiveImplementors = []string{"__Directive"}
|
|
|
|
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Directive")
|
|
case "name":
|
|
out.Values[i] = ec.___Directive_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___Directive_description(ctx, field, obj)
|
|
case "locations":
|
|
out.Values[i] = ec.___Directive_locations(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "args":
|
|
out.Values[i] = ec.___Directive_args(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __EnumValueImplementors = []string{"__EnumValue"}
|
|
|
|
func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__EnumValue")
|
|
case "name":
|
|
out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
|
|
case "isDeprecated":
|
|
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deprecationReason":
|
|
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __FieldImplementors = []string{"__Field"}
|
|
|
|
func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Field")
|
|
case "name":
|
|
out.Values[i] = ec.___Field_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___Field_description(ctx, field, obj)
|
|
case "args":
|
|
out.Values[i] = ec.___Field_args(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "type":
|
|
out.Values[i] = ec.___Field_type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "isDeprecated":
|
|
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deprecationReason":
|
|
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __InputValueImplementors = []string{"__InputValue"}
|
|
|
|
func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__InputValue")
|
|
case "name":
|
|
out.Values[i] = ec.___InputValue_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
|
|
case "type":
|
|
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "defaultValue":
|
|
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __SchemaImplementors = []string{"__Schema"}
|
|
|
|
func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Schema")
|
|
case "types":
|
|
out.Values[i] = ec.___Schema_types(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "queryType":
|
|
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "mutationType":
|
|
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
|
|
case "subscriptionType":
|
|
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
|
|
case "directives":
|
|
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __TypeImplementors = []string{"__Type"}
|
|
|
|
func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Type")
|
|
case "kind":
|
|
out.Values[i] = ec.___Type_kind(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "name":
|
|
out.Values[i] = ec.___Type_name(ctx, field, obj)
|
|
case "description":
|
|
out.Values[i] = ec.___Type_description(ctx, field, obj)
|
|
case "fields":
|
|
out.Values[i] = ec.___Type_fields(ctx, field, obj)
|
|
case "interfaces":
|
|
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
|
|
case "possibleTypes":
|
|
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
|
|
case "enumValues":
|
|
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
|
|
case "inputFields":
|
|
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
|
|
case "ofType":
|
|
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
// endregion **************************** object.gotpl ****************************
|
|
|
|
// region ***************************** type.gotpl *****************************
|
|
|
|
func (ec *executionContext) marshalNAlbum2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbum(ctx context.Context, sel ast.SelectionSet, v model.Album) graphql.Marshaler {
|
|
return ec._Album(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAlbum2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbum(ctx context.Context, sel ast.SelectionSet, v *model.Album) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Album(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAlbumResponse2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbumResponse(ctx context.Context, sel ast.SelectionSet, v model.AlbumResponse) graphql.Marshaler {
|
|
return ec._AlbumResponse(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAlbumResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbumResponse(ctx context.Context, sel ast.SelectionSet, v *model.AlbumResponse) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._AlbumResponse(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAuthResponse2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthResponse(ctx context.Context, sel ast.SelectionSet, v model.AuthResponse) graphql.Marshaler {
|
|
return ec._AuthResponse(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAuthResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthResponse(ctx context.Context, sel ast.SelectionSet, v *model.AuthResponse) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._AuthResponse(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNAuthResult2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthResult(ctx context.Context, v interface{}) (model.AuthResult, error) {
|
|
var res model.AuthResult
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAuthResult2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthResult(ctx context.Context, sel ast.SelectionSet, v model.AuthResult) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNAuthType2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthType(ctx context.Context, v interface{}) (model.AuthType, error) {
|
|
var res model.AuthType
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAuthType2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthType(ctx context.Context, sel ast.SelectionSet, v model.AuthType) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
res := graphql.MarshalBoolean(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNDevice2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐDevice(ctx context.Context, sel ast.SelectionSet, v model.Device) graphql.Marshaler {
|
|
return ec._Device(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNDevice2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDevice(ctx context.Context, sel ast.SelectionSet, v *model.Device) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Device(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNDeviceResponse2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceResponse(ctx context.Context, sel ast.SelectionSet, v model.DeviceResponse) graphql.Marshaler {
|
|
return ec._DeviceResponse(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNDeviceResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceResponse(ctx context.Context, sel ast.SelectionSet, v *model.DeviceResponse) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._DeviceResponse(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNDeviceType2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceType(ctx context.Context, v interface{}) (model.DeviceType, error) {
|
|
var res model.DeviceType
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNDeviceType2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceType(ctx context.Context, sel ast.SelectionSet, v model.DeviceType) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalID(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalID(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {
|
|
res, err := graphql.UnmarshalInt(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
|
|
res := graphql.MarshalInt(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMediaItem2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItem(ctx context.Context, sel ast.SelectionSet, v model.MediaItem) graphql.Marshaler {
|
|
return ec._MediaItem(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMediaItem2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItem(ctx context.Context, sel ast.SelectionSet, v *model.MediaItem) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._MediaItem(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMediaItemResponse2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItemResponse(ctx context.Context, sel ast.SelectionSet, v model.MediaItemResponse) graphql.Marshaler {
|
|
return ec._MediaItemResponse(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMediaItemResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItemResponse(ctx context.Context, sel ast.SelectionSet, v *model.MediaItemResponse) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._MediaItemResponse(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNNewAlbum2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐNewAlbum(ctx context.Context, v interface{}) (model.NewAlbum, error) {
|
|
res, err := ec.unmarshalInputNewAlbum(ctx, v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNNewMediaItem2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐNewMediaItem(ctx context.Context, v interface{}) (model.NewMediaItem, error) {
|
|
res, err := ec.unmarshalInputNewMediaItem(ctx, v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNNewTag2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐNewTag(ctx context.Context, v interface{}) (model.NewTag, error) {
|
|
res, err := ec.unmarshalInputNewTag(ctx, v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNNewUser2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐNewUser(ctx context.Context, v interface{}) (model.NewUser, error) {
|
|
res, err := ec.unmarshalInputNewUser(ctx, v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPageResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPageResponse(ctx context.Context, sel ast.SelectionSet, v *model.PageResponse) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._PageResponse(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx context.Context, v interface{}) (model.Role, error) {
|
|
var res model.Role
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNRole2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx context.Context, sel ast.SelectionSet, v model.Role) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
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) marshalNTag2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐTag(ctx context.Context, sel ast.SelectionSet, v model.Tag) graphql.Marshaler {
|
|
return ec._Tag(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTag2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTag(ctx context.Context, sel ast.SelectionSet, v *model.Tag) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Tag(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTagResponse2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐTagResponse(ctx context.Context, sel ast.SelectionSet, v model.TagResponse) graphql.Marshaler {
|
|
return ec._TagResponse(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTagResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTagResponse(ctx context.Context, sel ast.SelectionSet, v *model.TagResponse) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._TagResponse(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, v interface{}) (graphql.Upload, error) {
|
|
res, err := graphql.UnmarshalUpload(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, sel ast.SelectionSet, v graphql.Upload) graphql.Marshaler {
|
|
res := graphql.MarshalUpload(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUser2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v model.User) graphql.Marshaler {
|
|
return ec._User(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUser2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._User(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUserResponse2reichardᚗioᚋimaginiᚋgraphᚋmodelᚐUserResponse(ctx context.Context, sel ast.SelectionSet, v model.UserResponse) graphql.Marshaler {
|
|
return ec._UserResponse(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUserResponse2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUserResponse(ctx context.Context, sel ast.SelectionSet, v *model.UserResponse) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._UserResponse(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
|
|
return ec.___Directive(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
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) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
|
|
return ec.___EnumValue(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
|
|
return ec.___Field(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
|
|
return ec.___InputValue(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
|
|
return ec.___Type(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
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) marshalOAlbum2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbum(ctx context.Context, sel ast.SelectionSet, v []*model.Album) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOAlbum2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbum(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOAlbum2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbum(ctx context.Context, sel ast.SelectionSet, v *model.Album) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Album(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOAlbumFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAlbumFilter(ctx context.Context, v interface{}) (*model.AlbumFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputAlbumFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOAuthType2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthType(ctx context.Context, v interface{}) (*model.AuthType, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model.AuthType)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOAuthType2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthType(ctx context.Context, sel ast.SelectionSet, v *model.AuthType) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOAuthTypeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐAuthTypeFilter(ctx context.Context, v interface{}) (*model.AuthTypeFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputAuthTypeFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
return graphql.MarshalBoolean(v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalBoolean(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBooleanFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐBooleanFilter(ctx context.Context, v interface{}) (*model.BooleanFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputBooleanFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalODevice2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDevice(ctx context.Context, sel ast.SelectionSet, v []*model.Device) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalODevice2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDevice(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalODevice2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Device) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNDevice2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDevice(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalODevice2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDevice(ctx context.Context, sel ast.SelectionSet, v *model.Device) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Device(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalODeviceFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceFilter(ctx context.Context, v interface{}) (*model.DeviceFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputDeviceFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalODeviceType2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceType(ctx context.Context, v interface{}) (*model.DeviceType, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model.DeviceType)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalODeviceType2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceType(ctx context.Context, sel ast.SelectionSet, v *model.DeviceType) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalODeviceTypeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐDeviceTypeFilter(ctx context.Context, v interface{}) (*model.DeviceTypeFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputDeviceTypeFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOFloat2ᚖfloat64(ctx context.Context, v interface{}) (*float64, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalFloat(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOFloat2ᚖfloat64(ctx context.Context, sel ast.SelectionSet, v *float64) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalFloat(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOFloatFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐFloatFilter(ctx context.Context, v interface{}) (*model.FloatFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputFloatFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOID2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNID2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalOID2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNID2string(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOID2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalID(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOID2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalID(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOIDFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐIDFilter(ctx context.Context, v interface{}) (*model.IDFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputIDFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalInt(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalInt(*v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOMediaItem2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItem(ctx context.Context, sel ast.SelectionSet, v []*model.MediaItem) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOMediaItem2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItem(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOMediaItem2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItemᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.MediaItem) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNMediaItem2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItem(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOMediaItem2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItem(ctx context.Context, sel ast.SelectionSet, v *model.MediaItem) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._MediaItem(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOMediaItemFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐMediaItemFilter(ctx context.Context, v interface{}) (*model.MediaItemFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputMediaItemFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOOrder2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐOrder(ctx context.Context, v interface{}) (*model.Order, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputOrder(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOOrderDirection2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐOrderDirection(ctx context.Context, v interface{}) (*model.OrderDirection, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model.OrderDirection)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOOrderDirection2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐOrderDirection(ctx context.Context, sel ast.SelectionSet, v *model.OrderDirection) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOPage2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐPage(ctx context.Context, v interface{}) (*model.Page, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputPage(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalORole2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx context.Context, v interface{}) (*model.Role, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model.Role)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalORole2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐRole(ctx context.Context, sel ast.SelectionSet, v *model.Role) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalORoleFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐRoleFilter(ctx context.Context, v interface{}) (*model.RoleFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputRoleFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
return graphql.MarshalString(v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalString(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalString(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOStringFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐStringFilter(ctx context.Context, v interface{}) (*model.StringFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputStringFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTag2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTag(ctx context.Context, sel ast.SelectionSet, v []*model.Tag) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOTag2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTag(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTag2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTag(ctx context.Context, sel ast.SelectionSet, v *model.Tag) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Tag(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOTagFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTagFilter(ctx context.Context, v interface{}) (*model.TagFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputTagFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalTime(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalTime(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOTimeFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐTimeFilter(ctx context.Context, v interface{}) (*model.TimeFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputTimeFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOUser2ᚕᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v []*model.User) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOUser2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUser(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOUser2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._User(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOUserFilter2ᚖreichardᚗioᚋimaginiᚋgraphᚋmodelᚐUserFilter(ctx context.Context, v interface{}) (*model.UserFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputUserFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec.___Schema(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
// endregion ***************************** type.gotpl *****************************
|