1
Fork 0
photoview/api/graphql/generated.go

18024 lines
550 KiB
Go
Raw Normal View History

2020-01-30 14:28:14 +01:00
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
package api
import (
"bytes"
"context"
"embed"
2020-01-30 14:28:14 +01:00
"errors"
2020-01-31 23:30:34 +01:00
"fmt"
"io"
2020-01-30 14:28:14 +01:00
"strconv"
"sync"
"sync/atomic"
2020-02-02 00:29:42 +01:00
"time"
2020-01-30 14:28:14 +01:00
"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/introspection"
2020-12-17 22:51:43 +01:00
"github.com/photoview/photoview/api/graphql/models"
gqlparser "github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
2020-01-30 14:28:14 +01:00
)
// region ************************** generated!.gotpl **************************
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
return &executableSchema{
schema: cfg.Schema,
2020-01-30 14:28:14 +01:00
resolvers: cfg.Resolvers,
directives: cfg.Directives,
complexity: cfg.Complexity,
}
}
type Config struct {
Schema *ast.Schema
2020-01-30 14:28:14 +01:00
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
}
type ResolverRoot interface {
2020-02-05 16:14:21 +01:00
Album() AlbumResolver
2021-02-25 18:48:59 +01:00
FaceGroup() FaceGroupResolver
2021-02-19 23:30:43 +01:00
ImageFace() ImageFaceResolver
Media() MediaResolver
2020-01-30 14:28:14 +01:00
Mutation() MutationResolver
Query() QueryResolver
2020-02-09 21:25:33 +01:00
ShareToken() ShareTokenResolver
SiteInfo() SiteInfoResolver
Subscription() SubscriptionResolver
User() UserResolver
2020-01-30 14:28:14 +01:00
}
type DirectiveRoot struct {
IsAdmin func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
IsAuthorized func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
2020-01-30 14:28:14 +01:00
}
type ComplexityRoot struct {
2020-02-01 14:52:27 +01:00
Album struct {
2020-03-07 16:19:27 +01:00
FilePath func(childComplexity int) int
2020-02-01 14:52:27 +01:00
ID func(childComplexity int) int
Media func(childComplexity int, order *models.Ordering, paginate *models.Pagination, onlyFavorites *bool) int
2020-02-01 14:52:27 +01:00
Owner func(childComplexity int) int
ParentAlbum func(childComplexity int) int
Path func(childComplexity int) int
2020-02-11 14:32:35 +01:00
Shares func(childComplexity int) int
SubAlbums func(childComplexity int, order *models.Ordering, paginate *models.Pagination) int
2020-02-09 16:16:41 +01:00
Thumbnail func(childComplexity int) int
2020-02-01 14:52:27 +01:00
Title func(childComplexity int) int
}
2020-01-30 14:28:14 +01:00
AuthorizeResult struct {
Status func(childComplexity int) int
Success func(childComplexity int) int
Token func(childComplexity int) int
}
Coordinates struct {
Latitude func(childComplexity int) int
Longitude func(childComplexity int) int
}
2021-02-16 12:01:10 +01:00
FaceGroup struct {
2021-02-25 18:48:59 +01:00
ID func(childComplexity int) int
ImageFaceCount func(childComplexity int) int
ImageFaces func(childComplexity int, paginate *models.Pagination) int
Label func(childComplexity int) int
2021-02-16 12:01:10 +01:00
}
FaceRectangle struct {
MaxX func(childComplexity int) int
MaxY func(childComplexity int) int
MinX func(childComplexity int) int
MinY func(childComplexity int) int
}
ImageFace struct {
2021-02-19 23:30:43 +01:00
FaceGroup func(childComplexity int) int
2021-02-16 12:01:10 +01:00
ID func(childComplexity int) int
Media func(childComplexity int) int
Rectangle func(childComplexity int) int
}
Media struct {
2020-07-12 14:17:49 +02:00
Album func(childComplexity int) int
2022-02-01 23:39:19 +01:00
Blurhash func(childComplexity int) int
2021-09-18 20:17:24 +02:00
Date func(childComplexity int) int
2020-07-12 14:17:49 +02:00
Downloads func(childComplexity int) int
Exif func(childComplexity int) int
2021-02-16 17:13:08 +01:00
Faces func(childComplexity int) int
2020-07-12 14:17:49 +02:00
Favorite func(childComplexity int) int
HighRes func(childComplexity int) int
ID func(childComplexity int) int
Path func(childComplexity int) int
Shares func(childComplexity int) int
Thumbnail func(childComplexity int) int
Title func(childComplexity int) int
Type func(childComplexity int) int
VideoMetadata func(childComplexity int) int
VideoWeb func(childComplexity int) int
2020-02-01 14:52:27 +01:00
}
MediaDownload struct {
MediaURL func(childComplexity int) int
Title func(childComplexity int) int
2020-02-10 12:05:58 +01:00
}
2022-02-01 23:39:19 +01:00
MediaEXIF struct {
2020-02-24 23:30:08 +01:00
Aperture func(childComplexity int) int
Camera func(childComplexity int) int
Coordinates func(childComplexity int) int
2020-02-24 23:30:08 +01:00
DateShot func(childComplexity int) int
2022-03-28 17:08:30 +02:00
Description func(childComplexity int) int
2020-02-24 23:30:08 +01:00
Exposure func(childComplexity int) int
ExposureProgram func(childComplexity int) int
Flash func(childComplexity int) int
FocalLength func(childComplexity int) int
ID func(childComplexity int) int
Iso func(childComplexity int) int
Lens func(childComplexity int) int
Maker func(childComplexity int) int
Media func(childComplexity int) int
2020-02-02 00:29:42 +01:00
}
MediaURL struct {
FileSize func(childComplexity int) int
Height func(childComplexity int) int
URL func(childComplexity int) int
Width func(childComplexity int) int
2020-02-01 14:52:27 +01:00
}
Mutation struct {
2022-08-05 20:37:55 +02:00
AuthorizeUser func(childComplexity int, username string, password string) int
ChangeUserPreferences func(childComplexity int, language *string) int
CombineFaceGroups func(childComplexity int, destinationFaceGroupID int, sourceFaceGroupID int) int
CreateUser func(childComplexity int, username string, password *string, admin bool) int
DeleteShareToken func(childComplexity int, token string) int
DeleteUser func(childComplexity int, id int) int
DetachImageFaces func(childComplexity int, imageFaceIDs []int) int
FavoriteMedia func(childComplexity int, mediaID int, favorite bool) int
InitialSetupWizard func(childComplexity int, username string, password string, rootPath string) int
MoveImageFaces func(childComplexity int, imageFaceIDs []int, destinationFaceGroupID int) int
ProtectShareToken func(childComplexity int, token string, password *string) int
RecognizeUnlabeledFaces func(childComplexity int) int
ResetAlbumCover func(childComplexity int, albumID int) int
ScanAll func(childComplexity int) int
ScanUser func(childComplexity int, userID int) int
SetAlbumCover func(childComplexity int, coverID int) int
SetFaceGroupLabel func(childComplexity int, faceGroupID int, label *string) int
SetPeriodicScanInterval func(childComplexity int, interval int) int
SetScannerConcurrentWorkers func(childComplexity int, workers int) int
SetThumbnailDownsampleMethod func(childComplexity int, method models.ThumbnailFilter) int
2022-08-05 20:37:55 +02:00
ShareAlbum func(childComplexity int, albumID int, expire *time.Time, password *string) int
ShareMedia func(childComplexity int, mediaID int, expire *time.Time, password *string) int
UpdateUser func(childComplexity int, id int, username *string, password *string, admin *bool) int
UserAddRootPath func(childComplexity int, id int, rootPath string) int
UserRemoveRootAlbum func(childComplexity int, userID int, albumID int) int
}
Notification struct {
Content func(childComplexity int) int
Header func(childComplexity int) int
Key func(childComplexity int) int
Negative func(childComplexity int) int
Positive func(childComplexity int) int
Progress func(childComplexity int) int
Timeout func(childComplexity int) int
Type func(childComplexity int) int
}
2020-01-30 14:28:14 +01:00
Query struct {
Album func(childComplexity int, id int, tokenCredentials *models.ShareTokenCredentials) int
2021-02-25 20:39:24 +01:00
FaceGroup func(childComplexity int, id int) int
MapboxToken func(childComplexity int) int
Media func(childComplexity int, id int, tokenCredentials *models.ShareTokenCredentials) int
MediaList func(childComplexity int, ids []int) int
MyAlbums func(childComplexity int, order *models.Ordering, paginate *models.Pagination, onlyRoot *bool, showEmpty *bool, onlyWithFavorites *bool) int
2021-02-16 12:01:10 +01:00
MyFaceGroups func(childComplexity int, paginate *models.Pagination) int
MyMedia func(childComplexity int, order *models.Ordering, paginate *models.Pagination) int
MyMediaGeoJSON func(childComplexity int) int
2021-09-18 20:17:24 +02:00
MyTimeline func(childComplexity int, paginate *models.Pagination, onlyFavorites *bool, fromDate *time.Time) int
MyUser func(childComplexity int) int
MyUserPreferences func(childComplexity int) int
Search func(childComplexity int, query string, limitMedia *int, limitAlbums *int) int
ShareToken func(childComplexity int, credentials models.ShareTokenCredentials) int
ShareTokenValidatePassword func(childComplexity int, credentials models.ShareTokenCredentials) int
SiteInfo func(childComplexity int) int
User func(childComplexity int, order *models.Ordering, paginate *models.Pagination) int
2020-01-30 14:28:14 +01:00
}
2020-02-01 17:58:45 +01:00
ScannerResult struct {
Finished func(childComplexity int) int
Message func(childComplexity int) int
Progress func(childComplexity int) int
Success func(childComplexity int) int
}
2020-03-05 11:53:42 +01:00
SearchResult struct {
Albums func(childComplexity int) int
Media func(childComplexity int) int
2020-03-05 11:53:42 +01:00
Query func(childComplexity int) int
}
2020-02-09 21:25:33 +01:00
ShareToken struct {
Album func(childComplexity int) int
Expire func(childComplexity int) int
HasPassword func(childComplexity int) int
ID func(childComplexity int) int
Media func(childComplexity int) int
Owner func(childComplexity int) int
Token func(childComplexity int) int
2020-02-09 21:25:33 +01:00
}
2020-02-05 16:49:51 +01:00
SiteInfo struct {
ConcurrentWorkers func(childComplexity int) int
FaceDetectionEnabled func(childComplexity int) int
InitialSetup func(childComplexity int) int
PeriodicScanInterval func(childComplexity int) int
2022-08-05 20:37:55 +02:00
ThumbnailMethod func(childComplexity int) int
2020-02-05 16:49:51 +01:00
}
Subscription struct {
Notification func(childComplexity int) int
}
2021-02-04 19:02:51 +01:00
TimelineGroup struct {
Album func(childComplexity int) int
Date func(childComplexity int) int
Media func(childComplexity int) int
MediaTotal func(childComplexity int) int
}
2020-01-30 14:28:14 +01:00
User struct {
Admin func(childComplexity int) int
Albums func(childComplexity int) int
ID func(childComplexity int) int
RootAlbums func(childComplexity int) int
Username func(childComplexity int) int
2020-01-30 14:28:14 +01:00
}
2020-07-12 14:17:49 +02:00
UserPreferences struct {
ID func(childComplexity int) int
Language func(childComplexity int) int
}
2020-07-12 14:17:49 +02:00
VideoMetadata struct {
Audio func(childComplexity int) int
Bitrate func(childComplexity int) int
Codec func(childComplexity int) int
ColorProfile func(childComplexity int) int
Duration func(childComplexity int) int
Framerate func(childComplexity int) int
Height func(childComplexity int) int
ID func(childComplexity int) int
Media func(childComplexity int) int
Width func(childComplexity int) int
}
2020-01-30 14:28:14 +01:00
}
2020-02-05 16:14:21 +01:00
type AlbumResolver interface {
Media(ctx context.Context, obj *models.Album, order *models.Ordering, paginate *models.Pagination, onlyFavorites *bool) ([]*models.Media, error)
SubAlbums(ctx context.Context, obj *models.Album, order *models.Ordering, paginate *models.Pagination) ([]*models.Album, error)
2020-02-09 16:16:41 +01:00
2020-12-22 01:14:43 +01:00
Owner(ctx context.Context, obj *models.Album) (*models.User, error)
Thumbnail(ctx context.Context, obj *models.Album) (*models.Media, error)
2020-03-07 16:19:27 +01:00
Path(ctx context.Context, obj *models.Album) ([]*models.Album, error)
2020-02-11 14:32:35 +01:00
Shares(ctx context.Context, obj *models.Album) ([]*models.ShareToken, error)
2020-02-05 16:14:21 +01:00
}
2021-02-25 18:48:59 +01:00
type FaceGroupResolver interface {
ImageFaces(ctx context.Context, obj *models.FaceGroup, paginate *models.Pagination) ([]*models.ImageFace, error)
ImageFaceCount(ctx context.Context, obj *models.FaceGroup) (int, error)
}
2021-02-19 23:30:43 +01:00
type ImageFaceResolver interface {
2021-10-19 23:28:23 +02:00
Media(ctx context.Context, obj *models.ImageFace) (*models.Media, error)
2021-02-19 23:30:43 +01:00
FaceGroup(ctx context.Context, obj *models.ImageFace) (*models.FaceGroup, error)
}
type MediaResolver interface {
Thumbnail(ctx context.Context, obj *models.Media) (*models.MediaURL, error)
HighRes(ctx context.Context, obj *models.Media) (*models.MediaURL, error)
2020-07-11 15:57:58 +02:00
VideoWeb(ctx context.Context, obj *models.Media) (*models.MediaURL, error)
2021-09-18 20:17:24 +02:00
Album(ctx context.Context, obj *models.Media) (*models.Album, error)
2021-01-19 16:46:15 +01:00
Exif(ctx context.Context, obj *models.Media) (*models.MediaEXIF, error)
Favorite(ctx context.Context, obj *models.Media) (bool, error)
2021-04-27 20:31:15 +02:00
Type(ctx context.Context, obj *models.Media) (models.MediaType, error)
2021-09-18 20:17:24 +02:00
Shares(ctx context.Context, obj *models.Media) ([]*models.ShareToken, error)
Downloads(ctx context.Context, obj *models.Media) ([]*models.MediaDownload, error)
2021-02-16 17:13:08 +01:00
Faces(ctx context.Context, obj *models.Media) ([]*models.ImageFace, error)
}
2020-01-30 14:28:14 +01:00
type MutationResolver interface {
2020-02-01 00:08:23 +01:00
AuthorizeUser(ctx context.Context, username string, password string) (*models.AuthorizeResult, error)
2020-02-05 16:49:51 +01:00
InitialSetupWizard(ctx context.Context, username string, password string, rootPath string) (*models.AuthorizeResult, error)
2020-02-01 17:58:45 +01:00
ScanAll(ctx context.Context) (*models.ScannerResult, error)
2020-02-09 21:25:33 +01:00
ScanUser(ctx context.Context, userID int) (*models.ScannerResult, error)
ShareAlbum(ctx context.Context, albumID int, expire *time.Time, password *string) (*models.ShareToken, error)
ShareMedia(ctx context.Context, mediaID int, expire *time.Time, password *string) (*models.ShareToken, error)
2020-02-11 15:36:12 +01:00
DeleteShareToken(ctx context.Context, token string) (*models.ShareToken, error)
ProtectShareToken(ctx context.Context, token string, password *string) (*models.ShareToken, error)
FavoriteMedia(ctx context.Context, mediaID int, favorite bool) (*models.Media, error)
UpdateUser(ctx context.Context, id int, username *string, password *string, admin *bool) (*models.User, error)
CreateUser(ctx context.Context, username string, password *string, admin bool) (*models.User, error)
2020-02-16 12:22:00 +01:00
DeleteUser(ctx context.Context, id int) (*models.User, error)
UserAddRootPath(ctx context.Context, id int, rootPath string) (*models.Album, error)
UserRemoveRootAlbum(ctx context.Context, userID int, albumID int) (*models.Album, error)
2020-09-21 11:50:39 +02:00
SetPeriodicScanInterval(ctx context.Context, interval int) (int, error)
SetScannerConcurrentWorkers(ctx context.Context, workers int) (int, error)
SetThumbnailDownsampleMethod(ctx context.Context, method models.ThumbnailFilter) (models.ThumbnailFilter, error)
ChangeUserPreferences(ctx context.Context, language *string) (*models.UserPreferences, error)
ResetAlbumCover(ctx context.Context, albumID int) (*models.Album, error)
SetAlbumCover(ctx context.Context, coverID int) (*models.Album, error)
2021-02-17 13:50:32 +01:00
SetFaceGroupLabel(ctx context.Context, faceGroupID int, label *string) (*models.FaceGroup, error)
CombineFaceGroups(ctx context.Context, destinationFaceGroupID int, sourceFaceGroupID int) (*models.FaceGroup, error)
2021-02-20 14:45:43 +01:00
MoveImageFaces(ctx context.Context, imageFaceIDs []int, destinationFaceGroupID int) (*models.FaceGroup, error)
2021-02-17 13:50:32 +01:00
RecognizeUnlabeledFaces(ctx context.Context) ([]*models.ImageFace, error)
2021-02-22 18:14:31 +01:00
DetachImageFaces(ctx context.Context, imageFaceIDs []int) (*models.FaceGroup, error)
2020-01-30 14:28:14 +01:00
}
type QueryResolver interface {
2020-02-05 16:49:51 +01:00
SiteInfo(ctx context.Context) (*models.SiteInfo, error)
User(ctx context.Context, order *models.Ordering, paginate *models.Pagination) ([]*models.User, error)
2020-01-31 23:30:34 +01:00
MyUser(ctx context.Context) (*models.User, error)
MyUserPreferences(ctx context.Context) (*models.UserPreferences, error)
MyAlbums(ctx context.Context, order *models.Ordering, paginate *models.Pagination, onlyRoot *bool, showEmpty *bool, onlyWithFavorites *bool) ([]*models.Album, error)
Album(ctx context.Context, id int, tokenCredentials *models.ShareTokenCredentials) (*models.Album, error)
MyMedia(ctx context.Context, order *models.Ordering, paginate *models.Pagination) ([]*models.Media, error)
Media(ctx context.Context, id int, tokenCredentials *models.ShareTokenCredentials) (*models.Media, error)
MediaList(ctx context.Context, ids []int) ([]*models.Media, error)
2021-09-18 20:17:24 +02:00
MyTimeline(ctx context.Context, paginate *models.Pagination, onlyFavorites *bool, fromDate *time.Time) ([]*models.Media, error)
MyMediaGeoJSON(ctx context.Context) (interface{}, error)
MapboxToken(ctx context.Context) (*string, error)
ShareToken(ctx context.Context, credentials models.ShareTokenCredentials) (*models.ShareToken, error)
ShareTokenValidatePassword(ctx context.Context, credentials models.ShareTokenCredentials) (bool, error)
Search(ctx context.Context, query string, limitMedia *int, limitAlbums *int) (*models.SearchResult, error)
2021-02-16 12:01:10 +01:00
MyFaceGroups(ctx context.Context, paginate *models.Pagination) ([]*models.FaceGroup, error)
2021-02-25 20:39:24 +01:00
FaceGroup(ctx context.Context, id int) (*models.FaceGroup, error)
2020-02-09 21:25:33 +01:00
}
type ShareTokenResolver interface {
HasPassword(ctx context.Context, obj *models.ShareToken) (bool, error)
2020-01-30 14:28:14 +01:00
}
type SiteInfoResolver interface {
FaceDetectionEnabled(ctx context.Context, obj *models.SiteInfo) (bool, error)
}
type SubscriptionResolver interface {
Notification(ctx context.Context) (<-chan *models.Notification, error)
}
type UserResolver interface {
Albums(ctx context.Context, obj *models.User) ([]*models.Album, error)
RootAlbums(ctx context.Context, obj *models.User) ([]*models.Album, error)
}
2020-01-30 14:28:14 +01:00
type executableSchema struct {
schema *ast.Schema
2020-01-30 14:28:14 +01:00
resolvers ResolverRoot
directives DirectiveRoot
complexity ComplexityRoot
}
func (e *executableSchema) Schema() *ast.Schema {
if e.schema != nil {
return e.schema
}
2020-01-30 14:28:14 +01:00
return parsedSchema
}
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
ec := executionContext{nil, e, 0, 0, nil}
2020-01-30 14:28:14 +01:00
_ = ec
switch typeName + "." + field {
2020-03-07 16:19:27 +01:00
case "Album.filePath":
if e.complexity.Album.FilePath == nil {
break
}
return e.complexity.Album.FilePath(childComplexity), true
2020-02-01 14:52:27 +01:00
case "Album.id":
if e.complexity.Album.ID == nil {
break
}
return e.complexity.Album.ID(childComplexity), true
case "Album.media":
if e.complexity.Album.Media == nil {
break
}
args, err := ec.field_Album_media_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Album.Media(childComplexity, args["order"].(*models.Ordering), args["paginate"].(*models.Pagination), args["onlyFavorites"].(*bool)), true
2020-02-01 14:52:27 +01:00
case "Album.owner":
if e.complexity.Album.Owner == nil {
break
}
return e.complexity.Album.Owner(childComplexity), true
case "Album.parentAlbum":
if e.complexity.Album.ParentAlbum == nil {
break
}
return e.complexity.Album.ParentAlbum(childComplexity), true
case "Album.path":
if e.complexity.Album.Path == nil {
break
}
return e.complexity.Album.Path(childComplexity), true
2020-02-11 14:32:35 +01:00
case "Album.shares":
if e.complexity.Album.Shares == nil {
break
}
return e.complexity.Album.Shares(childComplexity), true
2020-02-01 14:52:27 +01:00
case "Album.subAlbums":
if e.complexity.Album.SubAlbums == nil {
break
}
2020-02-09 16:16:41 +01:00
args, err := ec.field_Album_subAlbums_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Album.SubAlbums(childComplexity, args["order"].(*models.Ordering), args["paginate"].(*models.Pagination)), true
2020-02-09 16:16:41 +01:00
case "Album.thumbnail":
if e.complexity.Album.Thumbnail == nil {
break
}
return e.complexity.Album.Thumbnail(childComplexity), true
2020-02-01 14:52:27 +01:00
case "Album.title":
if e.complexity.Album.Title == nil {
break
}
return e.complexity.Album.Title(childComplexity), true
2020-01-30 14:28:14 +01:00
case "AuthorizeResult.status":
if e.complexity.AuthorizeResult.Status == nil {
break
}
return e.complexity.AuthorizeResult.Status(childComplexity), true
case "AuthorizeResult.success":
if e.complexity.AuthorizeResult.Success == nil {
break
}
return e.complexity.AuthorizeResult.Success(childComplexity), true
case "AuthorizeResult.token":
if e.complexity.AuthorizeResult.Token == nil {
break
}
return e.complexity.AuthorizeResult.Token(childComplexity), true
case "Coordinates.latitude":
if e.complexity.Coordinates.Latitude == nil {
break
}
return e.complexity.Coordinates.Latitude(childComplexity), true
case "Coordinates.longitude":
if e.complexity.Coordinates.Longitude == nil {
break
}
return e.complexity.Coordinates.Longitude(childComplexity), true
2021-02-16 12:01:10 +01:00
case "FaceGroup.id":
if e.complexity.FaceGroup.ID == nil {
break
}
return e.complexity.FaceGroup.ID(childComplexity), true
2021-02-25 18:48:59 +01:00
case "FaceGroup.imageFaceCount":
if e.complexity.FaceGroup.ImageFaceCount == nil {
break
}
return e.complexity.FaceGroup.ImageFaceCount(childComplexity), true
2021-02-16 12:01:10 +01:00
case "FaceGroup.imageFaces":
if e.complexity.FaceGroup.ImageFaces == nil {
break
}
2021-02-25 18:48:59 +01:00
args, err := ec.field_FaceGroup_imageFaces_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.FaceGroup.ImageFaces(childComplexity, args["paginate"].(*models.Pagination)), true
2021-02-16 12:01:10 +01:00
case "FaceGroup.label":
if e.complexity.FaceGroup.Label == nil {
break
}
return e.complexity.FaceGroup.Label(childComplexity), true
case "FaceRectangle.maxX":
if e.complexity.FaceRectangle.MaxX == nil {
break
}
return e.complexity.FaceRectangle.MaxX(childComplexity), true
case "FaceRectangle.maxY":
if e.complexity.FaceRectangle.MaxY == nil {
break
}
return e.complexity.FaceRectangle.MaxY(childComplexity), true
case "FaceRectangle.minX":
if e.complexity.FaceRectangle.MinX == nil {
break
}
return e.complexity.FaceRectangle.MinX(childComplexity), true
case "FaceRectangle.minY":
if e.complexity.FaceRectangle.MinY == nil {
break
}
return e.complexity.FaceRectangle.MinY(childComplexity), true
2021-02-19 23:30:43 +01:00
case "ImageFace.faceGroup":
if e.complexity.ImageFace.FaceGroup == nil {
break
}
return e.complexity.ImageFace.FaceGroup(childComplexity), true
2021-02-16 12:01:10 +01:00
case "ImageFace.id":
if e.complexity.ImageFace.ID == nil {
break
}
return e.complexity.ImageFace.ID(childComplexity), true
case "ImageFace.media":
if e.complexity.ImageFace.Media == nil {
break
}
return e.complexity.ImageFace.Media(childComplexity), true
case "ImageFace.rectangle":
if e.complexity.ImageFace.Rectangle == nil {
break
}
return e.complexity.ImageFace.Rectangle(childComplexity), true
case "Media.album":
if e.complexity.Media.Album == nil {
break
}
return e.complexity.Media.Album(childComplexity), true
2022-02-01 23:39:19 +01:00
case "Media.blurhash":
if e.complexity.Media.Blurhash == nil {
break
}
return e.complexity.Media.Blurhash(childComplexity), true
2021-09-18 20:17:24 +02:00
case "Media.date":
if e.complexity.Media.Date == nil {
break
}
return e.complexity.Media.Date(childComplexity), true
case "Media.downloads":
if e.complexity.Media.Downloads == nil {
break
}
return e.complexity.Media.Downloads(childComplexity), true
case "Media.exif":
if e.complexity.Media.Exif == nil {
break
}
return e.complexity.Media.Exif(childComplexity), true
2021-02-16 17:13:08 +01:00
case "Media.faces":
if e.complexity.Media.Faces == nil {
break
}
return e.complexity.Media.Faces(childComplexity), true
case "Media.favorite":
if e.complexity.Media.Favorite == nil {
break
}
return e.complexity.Media.Favorite(childComplexity), true
case "Media.highRes":
if e.complexity.Media.HighRes == nil {
break
}
return e.complexity.Media.HighRes(childComplexity), true
case "Media.id":
if e.complexity.Media.ID == nil {
break
}
return e.complexity.Media.ID(childComplexity), true
case "Media.path":
if e.complexity.Media.Path == nil {
break
}
return e.complexity.Media.Path(childComplexity), true
case "Media.shares":
if e.complexity.Media.Shares == nil {
break
}
return e.complexity.Media.Shares(childComplexity), true
case "Media.thumbnail":
if e.complexity.Media.Thumbnail == nil {
break
}
return e.complexity.Media.Thumbnail(childComplexity), true
case "Media.title":
if e.complexity.Media.Title == nil {
break
}
return e.complexity.Media.Title(childComplexity), true
case "Media.type":
if e.complexity.Media.Type == nil {
break
}
return e.complexity.Media.Type(childComplexity), true
2020-07-12 14:17:49 +02:00
case "Media.videoMetadata":
if e.complexity.Media.VideoMetadata == nil {
break
}
return e.complexity.Media.VideoMetadata(childComplexity), true
2020-07-11 15:57:58 +02:00
case "Media.videoWeb":
if e.complexity.Media.VideoWeb == nil {
break
}
return e.complexity.Media.VideoWeb(childComplexity), true
case "MediaDownload.mediaUrl":
if e.complexity.MediaDownload.MediaURL == nil {
break
}
return e.complexity.MediaDownload.MediaURL(childComplexity), true
case "MediaDownload.title":
if e.complexity.MediaDownload.Title == nil {
break
}
return e.complexity.MediaDownload.Title(childComplexity), true
case "MediaEXIF.aperture":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.Aperture == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.Aperture(childComplexity), true
case "MediaEXIF.camera":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.Camera == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.Camera(childComplexity), true
case "MediaEXIF.coordinates":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.Coordinates == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.Coordinates(childComplexity), true
case "MediaEXIF.dateShot":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.DateShot == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.DateShot(childComplexity), true
2022-03-28 17:08:30 +02:00
case "MediaEXIF.description":
if e.complexity.MediaEXIF.Description == nil {
break
}
return e.complexity.MediaEXIF.Description(childComplexity), true
case "MediaEXIF.exposure":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.Exposure == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.Exposure(childComplexity), true
case "MediaEXIF.exposureProgram":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.ExposureProgram == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.ExposureProgram(childComplexity), true
case "MediaEXIF.flash":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.Flash == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.Flash(childComplexity), true
case "MediaEXIF.focalLength":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.FocalLength == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.FocalLength(childComplexity), true
case "MediaEXIF.id":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.ID == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.ID(childComplexity), true
case "MediaEXIF.iso":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.Iso == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.Iso(childComplexity), true
case "MediaEXIF.lens":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.Lens == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.Lens(childComplexity), true
case "MediaEXIF.maker":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.Maker == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.Maker(childComplexity), true
case "MediaEXIF.media":
2022-02-01 23:39:19 +01:00
if e.complexity.MediaEXIF.Media == nil {
break
}
2022-02-01 23:39:19 +01:00
return e.complexity.MediaEXIF.Media(childComplexity), true
case "MediaURL.fileSize":
if e.complexity.MediaURL.FileSize == nil {
break
}
return e.complexity.MediaURL.FileSize(childComplexity), true
case "MediaURL.height":
if e.complexity.MediaURL.Height == nil {
break
}
return e.complexity.MediaURL.Height(childComplexity), true
case "MediaURL.url":
if e.complexity.MediaURL.URL == nil {
break
}
return e.complexity.MediaURL.URL(childComplexity), true
case "MediaURL.width":
if e.complexity.MediaURL.Width == nil {
break
}
return e.complexity.MediaURL.Width(childComplexity), true
2020-01-30 14:28:14 +01:00
case "Mutation.authorizeUser":
if e.complexity.Mutation.AuthorizeUser == nil {
break
}
args, err := ec.field_Mutation_authorizeUser_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.AuthorizeUser(childComplexity, args["username"].(string), args["password"].(string)), true
case "Mutation.changeUserPreferences":
if e.complexity.Mutation.ChangeUserPreferences == nil {
break
}
args, err := ec.field_Mutation_changeUserPreferences_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.ChangeUserPreferences(childComplexity, args["language"].(*string)), true
2021-02-17 13:50:32 +01:00
case "Mutation.combineFaceGroups":
if e.complexity.Mutation.CombineFaceGroups == nil {
break
}
args, err := ec.field_Mutation_combineFaceGroups_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.CombineFaceGroups(childComplexity, args["destinationFaceGroupID"].(int), args["sourceFaceGroupID"].(int)), true
2020-02-16 12:22:00 +01:00
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["username"].(string), args["password"].(*string), args["admin"].(bool)), true
2020-02-16 12:22:00 +01:00
2020-02-11 15:36:12 +01:00
case "Mutation.deleteShareToken":
if e.complexity.Mutation.DeleteShareToken == nil {
break
}
args, err := ec.field_Mutation_deleteShareToken_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteShareToken(childComplexity, args["token"].(string)), true
2020-02-16 12:22:00 +01:00
case "Mutation.deleteUser":
if e.complexity.Mutation.DeleteUser == nil {
break
}
args, err := ec.field_Mutation_deleteUser_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteUser(childComplexity, args["id"].(int)), true
2021-02-22 18:14:31 +01:00
case "Mutation.detachImageFaces":
if e.complexity.Mutation.DetachImageFaces == nil {
break
}
args, err := ec.field_Mutation_detachImageFaces_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DetachImageFaces(childComplexity, args["imageFaceIDs"].([]int)), true
case "Mutation.favoriteMedia":
if e.complexity.Mutation.FavoriteMedia == nil {
2020-06-17 18:00:58 +02:00
break
}
args, err := ec.field_Mutation_favoriteMedia_args(context.TODO(), rawArgs)
2020-06-17 18:00:58 +02:00
if err != nil {
return 0, false
}
return e.complexity.Mutation.FavoriteMedia(childComplexity, args["mediaId"].(int), args["favorite"].(bool)), true
2020-06-17 18:00:58 +02:00
2020-02-05 16:49:51 +01:00
case "Mutation.initialSetupWizard":
if e.complexity.Mutation.InitialSetupWizard == nil {
break
}
args, err := ec.field_Mutation_initialSetupWizard_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.InitialSetupWizard(childComplexity, args["username"].(string), args["password"].(string), args["rootPath"].(string)), true
2021-02-20 14:45:43 +01:00
case "Mutation.moveImageFaces":
if e.complexity.Mutation.MoveImageFaces == nil {
2021-02-17 13:50:32 +01:00
break
}
2021-02-20 14:45:43 +01:00
args, err := ec.field_Mutation_moveImageFaces_args(context.TODO(), rawArgs)
2021-02-17 13:50:32 +01:00
if err != nil {
return 0, false
}
2021-02-20 14:45:43 +01:00
return e.complexity.Mutation.MoveImageFaces(childComplexity, args["imageFaceIDs"].([]int), args["destinationFaceGroupID"].(int)), true
2021-02-17 13:50:32 +01:00
case "Mutation.protectShareToken":
if e.complexity.Mutation.ProtectShareToken == nil {
break
}
args, err := ec.field_Mutation_protectShareToken_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.ProtectShareToken(childComplexity, args["token"].(string), args["password"].(*string)), true
2021-02-17 13:50:32 +01:00
case "Mutation.recognizeUnlabeledFaces":
if e.complexity.Mutation.RecognizeUnlabeledFaces == nil {
break
}
return e.complexity.Mutation.RecognizeUnlabeledFaces(childComplexity), true
case "Mutation.resetAlbumCover":
if e.complexity.Mutation.ResetAlbumCover == nil {
break
}
args, err := ec.field_Mutation_resetAlbumCover_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.ResetAlbumCover(childComplexity, args["albumID"].(int)), true
2020-02-01 17:58:45 +01:00
case "Mutation.scanAll":
if e.complexity.Mutation.ScanAll == nil {
break
}
return e.complexity.Mutation.ScanAll(childComplexity), true
case "Mutation.scanUser":
if e.complexity.Mutation.ScanUser == nil {
break
}
args, err := ec.field_Mutation_scanUser_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
2020-02-09 21:25:33 +01:00
return e.complexity.Mutation.ScanUser(childComplexity, args["userId"].(int)), true
case "Mutation.setAlbumCover":
if e.complexity.Mutation.SetAlbumCover == nil {
break
}
args, err := ec.field_Mutation_setAlbumCover_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.SetAlbumCover(childComplexity, args["coverID"].(int)), true
2021-02-17 13:50:32 +01:00
case "Mutation.setFaceGroupLabel":
if e.complexity.Mutation.SetFaceGroupLabel == nil {
break
}
args, err := ec.field_Mutation_setFaceGroupLabel_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.SetFaceGroupLabel(childComplexity, args["faceGroupID"].(int), args["label"].(*string)), true
2020-09-21 11:50:39 +02:00
case "Mutation.setPeriodicScanInterval":
if e.complexity.Mutation.SetPeriodicScanInterval == nil {
break
}
args, err := ec.field_Mutation_setPeriodicScanInterval_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.SetPeriodicScanInterval(childComplexity, args["interval"].(int)), true
case "Mutation.setScannerConcurrentWorkers":
if e.complexity.Mutation.SetScannerConcurrentWorkers == nil {
break
}
args, err := ec.field_Mutation_setScannerConcurrentWorkers_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.SetScannerConcurrentWorkers(childComplexity, args["workers"].(int)), true
2022-08-05 20:37:55 +02:00
case "Mutation.setThumbnailDownsampleMethod":
if e.complexity.Mutation.SetThumbnailDownsampleMethod == nil {
break
}
args, err := ec.field_Mutation_setThumbnailDownsampleMethod_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.SetThumbnailDownsampleMethod(childComplexity, args["method"].(models.ThumbnailFilter)), true
2022-08-05 20:37:55 +02:00
2020-02-09 21:25:33 +01:00
case "Mutation.shareAlbum":
if e.complexity.Mutation.ShareAlbum == nil {
break
}
args, err := ec.field_Mutation_shareAlbum_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.ShareAlbum(childComplexity, args["albumId"].(int), args["expire"].(*time.Time), args["password"].(*string)), true
case "Mutation.shareMedia":
if e.complexity.Mutation.ShareMedia == nil {
2020-02-09 21:25:33 +01:00
break
}
args, err := ec.field_Mutation_shareMedia_args(context.TODO(), rawArgs)
2020-02-09 21:25:33 +01:00
if err != nil {
return 0, false
}
return e.complexity.Mutation.ShareMedia(childComplexity, args["mediaId"].(int), args["expire"].(*time.Time), args["password"].(*string)), true
2020-02-01 17:58:45 +01:00
2020-02-16 12:22:00 +01:00
case "Mutation.updateUser":
if e.complexity.Mutation.UpdateUser == nil {
break
}
args, err := ec.field_Mutation_updateUser_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UpdateUser(childComplexity, args["id"].(int), args["username"].(*string), args["password"].(*string), args["admin"].(*bool)), true
2020-02-16 12:22:00 +01:00
case "Mutation.userAddRootPath":
if e.complexity.Mutation.UserAddRootPath == nil {
break
}
args, err := ec.field_Mutation_userAddRootPath_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UserAddRootPath(childComplexity, args["id"].(int), args["rootPath"].(string)), true
case "Mutation.userRemoveRootAlbum":
if e.complexity.Mutation.UserRemoveRootAlbum == nil {
break
}
args, err := ec.field_Mutation_userRemoveRootAlbum_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UserRemoveRootAlbum(childComplexity, args["userId"].(int), args["albumId"].(int)), true
case "Notification.content":
if e.complexity.Notification.Content == nil {
break
}
return e.complexity.Notification.Content(childComplexity), true
case "Notification.header":
if e.complexity.Notification.Header == nil {
break
}
return e.complexity.Notification.Header(childComplexity), true
case "Notification.key":
if e.complexity.Notification.Key == nil {
break
}
return e.complexity.Notification.Key(childComplexity), true
case "Notification.negative":
if e.complexity.Notification.Negative == nil {
break
}
return e.complexity.Notification.Negative(childComplexity), true
case "Notification.positive":
if e.complexity.Notification.Positive == nil {
break
}
return e.complexity.Notification.Positive(childComplexity), true
case "Notification.progress":
if e.complexity.Notification.Progress == nil {
break
}
return e.complexity.Notification.Progress(childComplexity), true
2020-02-26 19:44:47 +01:00
case "Notification.timeout":
if e.complexity.Notification.Timeout == nil {
break
}
return e.complexity.Notification.Timeout(childComplexity), true
case "Notification.type":
if e.complexity.Notification.Type == nil {
break
}
return e.complexity.Notification.Type(childComplexity), true
case "Query.album":
if e.complexity.Query.Album == nil {
2020-02-01 14:52:27 +01:00
break
}
args, err := ec.field_Query_album_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
2020-02-10 12:05:58 +01:00
}
return e.complexity.Query.Album(childComplexity, args["id"].(int), args["tokenCredentials"].(*models.ShareTokenCredentials)), true
2020-02-10 12:05:58 +01:00
2021-02-25 20:39:24 +01:00
case "Query.faceGroup":
if e.complexity.Query.FaceGroup == nil {
break
}
args, err := ec.field_Query_faceGroup_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.FaceGroup(childComplexity, args["id"].(int)), true
case "Query.mapboxToken":
if e.complexity.Query.MapboxToken == nil {
break
}
return e.complexity.Query.MapboxToken(childComplexity), true
case "Query.media":
if e.complexity.Query.Media == nil {
2020-02-02 00:29:42 +01:00
break
}
args, err := ec.field_Query_media_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
2020-06-17 18:00:58 +02:00
}
return e.complexity.Query.Media(childComplexity, args["id"].(int), args["tokenCredentials"].(*models.ShareTokenCredentials)), true
2020-06-17 18:00:58 +02:00
case "Query.mediaList":
if e.complexity.Query.MediaList == nil {
break
}
args, err := ec.field_Query_mediaList_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.MediaList(childComplexity, args["ids"].([]int)), true
case "Query.myAlbums":
if e.complexity.Query.MyAlbums == nil {
2020-02-09 12:53:21 +01:00
break
}
args, err := ec.field_Query_myAlbums_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
2020-02-01 14:52:27 +01:00
}
return e.complexity.Query.MyAlbums(childComplexity, args["order"].(*models.Ordering), args["paginate"].(*models.Pagination), args["onlyRoot"].(*bool), args["showEmpty"].(*bool), args["onlyWithFavorites"].(*bool)), true
2020-02-01 14:52:27 +01:00
2021-02-16 12:01:10 +01:00
case "Query.myFaceGroups":
if e.complexity.Query.MyFaceGroups == nil {
break
}
args, err := ec.field_Query_myFaceGroups_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.MyFaceGroups(childComplexity, args["paginate"].(*models.Pagination)), true
case "Query.myMedia":
if e.complexity.Query.MyMedia == nil {
2020-02-01 14:52:27 +01:00
break
}
args, err := ec.field_Query_myMedia_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
2020-02-01 14:52:27 +01:00
}
return e.complexity.Query.MyMedia(childComplexity, args["order"].(*models.Ordering), args["paginate"].(*models.Pagination)), true
2020-02-01 14:52:27 +01:00
case "Query.myMediaGeoJson":
if e.complexity.Query.MyMediaGeoJSON == nil {
break
}
return e.complexity.Query.MyMediaGeoJSON(childComplexity), true
2021-02-04 19:02:51 +01:00
case "Query.myTimeline":
if e.complexity.Query.MyTimeline == nil {
break
}
2021-02-07 17:13:27 +01:00
args, err := ec.field_Query_myTimeline_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
2021-09-18 20:17:24 +02:00
return e.complexity.Query.MyTimeline(childComplexity, args["paginate"].(*models.Pagination), args["onlyFavorites"].(*bool), args["fromDate"].(*time.Time)), true
2021-02-04 19:02:51 +01:00
case "Query.myUser":
if e.complexity.Query.MyUser == nil {
2020-02-01 14:52:27 +01:00
break
}
return e.complexity.Query.MyUser(childComplexity), true
2020-02-01 14:52:27 +01:00
case "Query.myUserPreferences":
if e.complexity.Query.MyUserPreferences == nil {
break
}
return e.complexity.Query.MyUserPreferences(childComplexity), true
case "Query.search":
if e.complexity.Query.Search == nil {
2020-02-01 14:52:27 +01:00
break
}
args, err := ec.field_Query_search_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
2020-02-21 22:42:39 +01:00
}
return e.complexity.Query.Search(childComplexity, args["query"].(string), args["limitMedia"].(*int), args["limitAlbums"].(*int)), true
2020-02-21 22:42:39 +01:00
case "Query.shareToken":
if e.complexity.Query.ShareToken == nil {
2020-02-10 12:05:58 +01:00
break
}
args, err := ec.field_Query_shareToken_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
2020-02-10 12:05:58 +01:00
}
return e.complexity.Query.ShareToken(childComplexity, args["credentials"].(models.ShareTokenCredentials)), true
2020-02-10 12:05:58 +01:00
case "Query.shareTokenValidatePassword":
if e.complexity.Query.ShareTokenValidatePassword == nil {
2020-02-21 22:42:39 +01:00
break
}
args, err := ec.field_Query_shareTokenValidatePassword_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
2020-02-02 00:29:42 +01:00
}
return e.complexity.Query.ShareTokenValidatePassword(childComplexity, args["credentials"].(models.ShareTokenCredentials)), true
2020-02-02 00:29:42 +01:00
case "Query.siteInfo":
if e.complexity.Query.SiteInfo == nil {
2020-02-02 00:29:42 +01:00
break
}
return e.complexity.Query.SiteInfo(childComplexity), true
2020-02-02 00:29:42 +01:00
case "Query.user":
if e.complexity.Query.User == nil {
2020-02-02 00:29:42 +01:00
break
}
args, err := ec.field_Query_user_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
2020-02-02 00:29:42 +01:00
}
return e.complexity.Query.User(childComplexity, args["order"].(*models.Ordering), args["paginate"].(*models.Pagination)), true
2020-02-02 00:29:42 +01:00
case "ScannerResult.finished":
if e.complexity.ScannerResult.Finished == nil {
2020-02-02 00:29:42 +01:00
break
}
return e.complexity.ScannerResult.Finished(childComplexity), true
2020-02-02 00:29:42 +01:00
case "ScannerResult.message":
if e.complexity.ScannerResult.Message == nil {
2020-02-02 00:29:42 +01:00
break
}
return e.complexity.ScannerResult.Message(childComplexity), true
2020-02-02 00:29:42 +01:00
case "ScannerResult.progress":
if e.complexity.ScannerResult.Progress == nil {
2020-02-02 00:29:42 +01:00
break
}
return e.complexity.ScannerResult.Progress(childComplexity), true
2020-02-01 17:58:45 +01:00
case "ScannerResult.success":
if e.complexity.ScannerResult.Success == nil {
break
}
return e.complexity.ScannerResult.Success(childComplexity), true
2020-03-05 11:53:42 +01:00
case "SearchResult.albums":
if e.complexity.SearchResult.Albums == nil {
break
}
return e.complexity.SearchResult.Albums(childComplexity), true
case "SearchResult.media":
if e.complexity.SearchResult.Media == nil {
2020-03-05 11:53:42 +01:00
break
}
return e.complexity.SearchResult.Media(childComplexity), true
2020-03-05 11:53:42 +01:00
case "SearchResult.query":
if e.complexity.SearchResult.Query == nil {
break
}
return e.complexity.SearchResult.Query(childComplexity), true
2020-02-09 21:25:33 +01:00
case "ShareToken.album":
if e.complexity.ShareToken.Album == nil {
break
}
return e.complexity.ShareToken.Album(childComplexity), true
case "ShareToken.expire":
if e.complexity.ShareToken.Expire == nil {
break
}
return e.complexity.ShareToken.Expire(childComplexity), true
case "ShareToken.hasPassword":
if e.complexity.ShareToken.HasPassword == nil {
break
}
return e.complexity.ShareToken.HasPassword(childComplexity), true
2020-02-09 21:25:33 +01:00
case "ShareToken.id":
if e.complexity.ShareToken.ID == nil {
break
}
return e.complexity.ShareToken.ID(childComplexity), true
case "ShareToken.media":
if e.complexity.ShareToken.Media == nil {
2020-02-09 21:25:33 +01:00
break
}
return e.complexity.ShareToken.Media(childComplexity), true
2020-02-09 21:25:33 +01:00
case "ShareToken.owner":
if e.complexity.ShareToken.Owner == nil {
2020-02-09 21:25:33 +01:00
break
}
return e.complexity.ShareToken.Owner(childComplexity), true
2020-02-09 21:25:33 +01:00
case "ShareToken.token":
if e.complexity.ShareToken.Token == nil {
break
}
return e.complexity.ShareToken.Token(childComplexity), true
case "SiteInfo.concurrentWorkers":
if e.complexity.SiteInfo.ConcurrentWorkers == nil {
break
}
return e.complexity.SiteInfo.ConcurrentWorkers(childComplexity), true
case "SiteInfo.faceDetectionEnabled":
if e.complexity.SiteInfo.FaceDetectionEnabled == nil {
break
}
return e.complexity.SiteInfo.FaceDetectionEnabled(childComplexity), true
2020-02-05 16:49:51 +01:00
case "SiteInfo.initialSetup":
if e.complexity.SiteInfo.InitialSetup == nil {
break
}
return e.complexity.SiteInfo.InitialSetup(childComplexity), true
case "SiteInfo.periodicScanInterval":
if e.complexity.SiteInfo.PeriodicScanInterval == nil {
break
}
return e.complexity.SiteInfo.PeriodicScanInterval(childComplexity), true
2022-08-05 20:37:55 +02:00
case "SiteInfo.thumbnailMethod":
if e.complexity.SiteInfo.ThumbnailMethod == nil {
break
}
return e.complexity.SiteInfo.ThumbnailMethod(childComplexity), true
case "Subscription.notification":
if e.complexity.Subscription.Notification == nil {
break
}
return e.complexity.Subscription.Notification(childComplexity), true
2021-02-04 19:02:51 +01:00
case "TimelineGroup.album":
if e.complexity.TimelineGroup.Album == nil {
break
}
return e.complexity.TimelineGroup.Album(childComplexity), true
case "TimelineGroup.date":
if e.complexity.TimelineGroup.Date == nil {
break
}
return e.complexity.TimelineGroup.Date(childComplexity), true
case "TimelineGroup.media":
if e.complexity.TimelineGroup.Media == nil {
break
}
return e.complexity.TimelineGroup.Media(childComplexity), true
case "TimelineGroup.mediaTotal":
if e.complexity.TimelineGroup.MediaTotal == nil {
break
}
return e.complexity.TimelineGroup.MediaTotal(childComplexity), true
2020-01-30 14:28:14 +01:00
case "User.admin":
if e.complexity.User.Admin == nil {
break
}
return e.complexity.User.Admin(childComplexity), true
case "User.albums":
if e.complexity.User.Albums == nil {
2020-01-30 14:28:14 +01:00
break
}
return e.complexity.User.Albums(childComplexity), true
2020-01-30 14:28:14 +01:00
case "User.id":
if e.complexity.User.ID == nil {
2020-01-30 14:28:14 +01:00
break
}
return e.complexity.User.ID(childComplexity), true
2020-01-30 14:28:14 +01:00
case "User.rootAlbums":
if e.complexity.User.RootAlbums == nil {
break
}
return e.complexity.User.RootAlbums(childComplexity), true
2020-01-30 14:28:14 +01:00
case "User.username":
if e.complexity.User.Username == nil {
break
}
return e.complexity.User.Username(childComplexity), true
case "UserPreferences.id":
if e.complexity.UserPreferences.ID == nil {
break
}
return e.complexity.UserPreferences.ID(childComplexity), true
case "UserPreferences.language":
if e.complexity.UserPreferences.Language == nil {
break
}
return e.complexity.UserPreferences.Language(childComplexity), true
2020-07-12 14:17:49 +02:00
case "VideoMetadata.audio":
if e.complexity.VideoMetadata.Audio == nil {
break
}
return e.complexity.VideoMetadata.Audio(childComplexity), true
case "VideoMetadata.bitrate":
if e.complexity.VideoMetadata.Bitrate == nil {
break
}
return e.complexity.VideoMetadata.Bitrate(childComplexity), true
case "VideoMetadata.codec":
if e.complexity.VideoMetadata.Codec == nil {
break
}
return e.complexity.VideoMetadata.Codec(childComplexity), true
case "VideoMetadata.colorProfile":
if e.complexity.VideoMetadata.ColorProfile == nil {
break
}
return e.complexity.VideoMetadata.ColorProfile(childComplexity), true
case "VideoMetadata.duration":
if e.complexity.VideoMetadata.Duration == nil {
break
}
return e.complexity.VideoMetadata.Duration(childComplexity), true
case "VideoMetadata.framerate":
if e.complexity.VideoMetadata.Framerate == nil {
break
}
return e.complexity.VideoMetadata.Framerate(childComplexity), true
case "VideoMetadata.height":
if e.complexity.VideoMetadata.Height == nil {
break
}
return e.complexity.VideoMetadata.Height(childComplexity), true
case "VideoMetadata.id":
if e.complexity.VideoMetadata.ID == nil {
break
}
return e.complexity.VideoMetadata.ID(childComplexity), true
case "VideoMetadata.media":
if e.complexity.VideoMetadata.Media == nil {
break
}
return e.complexity.VideoMetadata.Media(childComplexity), true
case "VideoMetadata.width":
if e.complexity.VideoMetadata.Width == nil {
break
}
return e.complexity.VideoMetadata.Width(childComplexity), true
2020-01-30 14:28:14 +01:00
}
return 0, false
}
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
rc := graphql.GetOperationContext(ctx)
ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)}
inputUnmarshalMap := graphql.BuildUnmarshalerMap(
ec.unmarshalInputOrdering,
ec.unmarshalInputPagination,
ec.unmarshalInputShareTokenCredentials,
)
first := true
2020-01-30 14:28:14 +01:00
switch rc.Operation.Operation {
case ast.Query:
return func(ctx context.Context) *graphql.Response {
var response graphql.Response
var data graphql.Marshaler
if first {
first = false
ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
data = ec._Query(ctx, rc.Operation.SelectionSet)
} else {
if atomic.LoadInt32(&ec.pendingDeferred) > 0 {
result := <-ec.deferredResults
atomic.AddInt32(&ec.pendingDeferred, -1)
data = result.Result
response.Path = result.Path
response.Label = result.Label
response.Errors = result.Errors
} else {
return nil
}
}
var buf bytes.Buffer
data.MarshalGQL(&buf)
response.Data = buf.Bytes()
if atomic.LoadInt32(&ec.deferred) > 0 {
hasNext := atomic.LoadInt32(&ec.pendingDeferred) > 0
response.HasNext = &hasNext
}
return &response
}
case ast.Mutation:
return func(ctx context.Context) *graphql.Response {
if !first {
return nil
}
first = false
ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
data := ec._Mutation(ctx, rc.Operation.SelectionSet)
var buf bytes.Buffer
data.MarshalGQL(&buf)
2020-01-30 14:28:14 +01:00
return &graphql.Response{
Data: buf.Bytes(),
}
}
case ast.Subscription:
next := ec._Subscription(ctx, rc.Operation.SelectionSet)
2020-01-30 14:28:14 +01:00
var buf bytes.Buffer
return func(ctx context.Context) *graphql.Response {
buf.Reset()
data := next(ctx)
if data == nil {
return nil
}
data.MarshalGQL(&buf)
return &graphql.Response{
Data: buf.Bytes(),
}
}
default:
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
}
2020-01-30 14:28:14 +01:00
}
type executionContext struct {
*graphql.OperationContext
2020-01-30 14:28:14 +01:00
*executableSchema
deferred int32
pendingDeferred int32
deferredResults chan graphql.DeferredResult
}
func (ec *executionContext) processDeferredGroup(dg graphql.DeferredGroup) {
atomic.AddInt32(&ec.pendingDeferred, 1)
go func() {
ctx := graphql.WithFreshResponseContext(dg.Context)
dg.FieldSet.Dispatch(ctx)
ds := graphql.DeferredResult{
Path: dg.Path,
Label: dg.Label,
Result: dg.FieldSet,
Errors: graphql.GetErrors(ctx),
}
// null fields should bubble up
if dg.FieldSet.Invalids > 0 {
ds.Result = graphql.Null
}
ec.deferredResults <- ds
}()
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
if ec.DisableIntrospection {
return nil, errors.New("introspection disabled")
}
return introspection.WrapSchema(ec.Schema()), nil
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
if ec.DisableIntrospection {
return nil, errors.New("introspection disabled")
}
return introspection.WrapTypeFromDef(ec.Schema(), ec.Schema().Types[name]), nil
2020-01-30 14:28:14 +01:00
}
//go:embed "schema.graphql"
var sourcesFS embed.FS
func sourceData(filename string) string {
data, err := sourcesFS.ReadFile(filename)
if err != nil {
panic(fmt.Sprintf("codegen problem: %s not available", filename))
}
return string(data)
}
var sources = []*ast.Source{
{Name: "schema.graphql", Input: sourceData("schema.graphql"), BuiltIn: false},
}
var parsedSchema = gqlparser.MustLoadSchema(sources...)
2020-01-30 14:28:14 +01:00
// endregion ************************** generated!.gotpl **************************
// region ***************************** args.gotpl *****************************
func (ec *executionContext) field_Album_media_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
2020-02-09 15:26:59 +01:00
var err error
args := map[string]interface{}{}
var arg0 *models.Ordering
if tmp, ok := rawArgs["order"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
arg0, err = ec.unmarshalOOrdering2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐOrdering(ctx, tmp)
2020-02-09 15:26:59 +01:00
if err != nil {
return nil, err
}
}
args["order"] = arg0
var arg1 *models.Pagination
if tmp, ok := rawArgs["paginate"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paginate"))
arg1, err = ec.unmarshalOPagination2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPagination(ctx, tmp)
if err != nil {
return nil, err
}
}
args["paginate"] = arg1
var arg2 *bool
if tmp, ok := rawArgs["onlyFavorites"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("onlyFavorites"))
arg2, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
if err != nil {
return nil, err
}
}
args["onlyFavorites"] = arg2
2020-02-09 15:26:59 +01:00
return args, nil
}
2020-02-09 16:16:41 +01:00
func (ec *executionContext) field_Album_subAlbums_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *models.Ordering
if tmp, ok := rawArgs["order"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
arg0, err = ec.unmarshalOOrdering2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐOrdering(ctx, tmp)
2020-02-09 16:16:41 +01:00
if err != nil {
return nil, err
}
}
args["order"] = arg0
var arg1 *models.Pagination
if tmp, ok := rawArgs["paginate"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paginate"))
arg1, err = ec.unmarshalOPagination2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPagination(ctx, tmp)
if err != nil {
return nil, err
}
}
args["paginate"] = arg1
2020-02-09 16:16:41 +01:00
return args, nil
}
2021-02-25 18:48:59 +01:00
func (ec *executionContext) field_FaceGroup_imageFaces_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *models.Pagination
if tmp, ok := rawArgs["paginate"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paginate"))
arg0, err = ec.unmarshalOPagination2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPagination(ctx, tmp)
if err != nil {
return nil, err
}
}
args["paginate"] = arg0
return args, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) field_Mutation_authorizeUser_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["username"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
2020-01-30 14:28:14 +01:00
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["username"] = arg0
var arg1 string
if tmp, ok := rawArgs["password"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
2020-01-30 14:28:14 +01:00
arg1, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["password"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_changeUserPreferences_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["language"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("language"))
arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
if err != nil {
return nil, err
}
}
args["language"] = arg0
return args, nil
}
2021-02-17 13:50:32 +01:00
func (ec *executionContext) field_Mutation_combineFaceGroups_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["destinationFaceGroupID"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("destinationFaceGroupID"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["destinationFaceGroupID"] = arg0
var arg1 int
if tmp, ok := rawArgs["sourceFaceGroupID"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sourceFaceGroupID"))
arg1, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["sourceFaceGroupID"] = arg1
return args, nil
}
2020-02-16 12:22:00 +01:00
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 string
if tmp, ok := rawArgs["username"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
2020-02-16 12:22:00 +01:00
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["username"] = arg0
var arg1 *string
2020-02-16 12:22:00 +01:00
if tmp, ok := rawArgs["password"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
2020-02-16 12:22:00 +01:00
if err != nil {
return nil, err
}
}
args["password"] = arg1
var arg2 bool
2020-02-16 12:22:00 +01:00
if tmp, ok := rawArgs["admin"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("admin"))
arg2, err = ec.unmarshalNBoolean2bool(ctx, tmp)
2020-02-16 12:22:00 +01:00
if err != nil {
return nil, err
}
}
args["admin"] = arg2
2020-02-16 12:22:00 +01:00
return args, nil
}
2020-02-11 15:36:12 +01:00
func (ec *executionContext) field_Mutation_deleteShareToken_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["token"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("token"))
2020-02-11 15:36:12 +01:00
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["token"] = arg0
return args, nil
}
2020-02-16 12:22:00 +01:00
func (ec *executionContext) field_Mutation_deleteUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["id"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
2020-02-16 12:22:00 +01:00
if err != nil {
return nil, err
}
}
args["id"] = arg0
return args, nil
}
2021-02-22 18:14:31 +01:00
func (ec *executionContext) field_Mutation_detachImageFaces_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 []int
if tmp, ok := rawArgs["imageFaceIDs"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("imageFaceIDs"))
arg0, err = ec.unmarshalNID2ᚕintᚄ(ctx, tmp)
if err != nil {
return nil, err
}
}
args["imageFaceIDs"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_favoriteMedia_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
2020-06-17 18:00:58 +02:00
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["mediaId"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mediaId"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
2020-06-17 18:00:58 +02:00
if err != nil {
return nil, err
}
}
args["mediaId"] = arg0
2020-06-17 18:00:58 +02:00
var arg1 bool
if tmp, ok := rawArgs["favorite"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("favorite"))
2020-06-17 18:00:58 +02:00
arg1, err = ec.unmarshalNBoolean2bool(ctx, tmp)
if err != nil {
return nil, err
}
}
args["favorite"] = arg1
return args, nil
}
2020-02-05 16:49:51 +01:00
func (ec *executionContext) field_Mutation_initialSetupWizard_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["username"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
2020-02-05 16:49:51 +01:00
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["username"] = arg0
var arg1 string
if tmp, ok := rawArgs["password"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
2020-02-05 16:49:51 +01:00
arg1, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["password"] = arg1
var arg2 string
if tmp, ok := rawArgs["rootPath"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rootPath"))
2020-02-05 16:49:51 +01:00
arg2, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["rootPath"] = arg2
return args, nil
}
2021-02-20 14:45:43 +01:00
func (ec *executionContext) field_Mutation_moveImageFaces_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
2021-02-17 13:50:32 +01:00
var err error
args := map[string]interface{}{}
2021-02-20 14:45:43 +01:00
var arg0 []int
if tmp, ok := rawArgs["imageFaceIDs"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("imageFaceIDs"))
arg0, err = ec.unmarshalNID2ᚕintᚄ(ctx, tmp)
2021-02-17 13:50:32 +01:00
if err != nil {
return nil, err
}
}
2021-02-20 14:45:43 +01:00
args["imageFaceIDs"] = arg0
2021-02-17 13:50:32 +01:00
var arg1 int
2021-02-20 14:45:43 +01:00
if tmp, ok := rawArgs["destinationFaceGroupID"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("destinationFaceGroupID"))
2021-02-17 13:50:32 +01:00
arg1, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
2021-02-20 14:45:43 +01:00
args["destinationFaceGroupID"] = arg1
2021-02-17 13:50:32 +01:00
return args, nil
}
func (ec *executionContext) field_Mutation_protectShareToken_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["token"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("token"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["token"] = arg0
var arg1 *string
if tmp, ok := rawArgs["password"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
if err != nil {
return nil, err
}
}
args["password"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_resetAlbumCover_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
2020-02-01 17:58:45 +01:00
var err error
args := map[string]interface{}{}
2020-02-09 21:25:33 +01:00
var arg0 int
if tmp, ok := rawArgs["albumID"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("albumID"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
2020-02-01 17:58:45 +01:00
if err != nil {
return nil, err
}
}
args["albumID"] = arg0
2020-02-01 17:58:45 +01:00
return args, nil
}
func (ec *executionContext) field_Mutation_scanUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
2020-02-09 21:25:33 +01:00
var arg0 int
2020-02-01 17:58:45 +01:00
if tmp, ok := rawArgs["userId"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userId"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
2020-02-01 17:58:45 +01:00
if err != nil {
return nil, err
}
}
args["userId"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_setAlbumCover_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["coverID"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("coverID"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["coverID"] = arg0
return args, nil
}
2021-02-17 13:50:32 +01:00
func (ec *executionContext) field_Mutation_setFaceGroupLabel_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["faceGroupID"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("faceGroupID"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["faceGroupID"] = arg0
var arg1 *string
if tmp, ok := rawArgs["label"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("label"))
arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
if err != nil {
return nil, err
}
}
args["label"] = arg1
return args, nil
}
2020-09-21 11:50:39 +02:00
func (ec *executionContext) field_Mutation_setPeriodicScanInterval_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["interval"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("interval"))
2020-09-21 11:50:39 +02:00
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["interval"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_setScannerConcurrentWorkers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["workers"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("workers"))
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["workers"] = arg0
return args, nil
}
2022-08-05 20:37:55 +02:00
func (ec *executionContext) field_Mutation_setThumbnailDownsampleMethod_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 models.ThumbnailFilter
2022-08-05 20:37:55 +02:00
if tmp, ok := rawArgs["method"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("method"))
arg0, err = ec.unmarshalNThumbnailFilter2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐThumbnailFilter(ctx, tmp)
2022-08-05 20:37:55 +02:00
if err != nil {
return nil, err
}
}
args["method"] = arg0
return args, nil
}
2020-02-09 21:25:33 +01:00
func (ec *executionContext) field_Mutation_shareAlbum_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["albumId"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("albumId"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
2020-02-09 21:25:33 +01:00
if err != nil {
return nil, err
}
}
args["albumId"] = arg0
var arg1 *time.Time
if tmp, ok := rawArgs["expire"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("expire"))
2020-02-09 21:25:33 +01:00
arg1, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp)
if err != nil {
return nil, err
}
}
args["expire"] = arg1
var arg2 *string
if tmp, ok := rawArgs["password"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
2020-02-09 21:25:33 +01:00
arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
if err != nil {
return nil, err
}
}
args["password"] = arg2
return args, nil
}
func (ec *executionContext) field_Mutation_shareMedia_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
2020-02-09 21:25:33 +01:00
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["mediaId"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mediaId"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
2020-02-09 21:25:33 +01:00
if err != nil {
return nil, err
}
}
args["mediaId"] = arg0
2020-02-09 21:25:33 +01:00
var arg1 *time.Time
if tmp, ok := rawArgs["expire"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("expire"))
2020-02-09 21:25:33 +01:00
arg1, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp)
if err != nil {
return nil, err
}
}
args["expire"] = arg1
var arg2 *string
if tmp, ok := rawArgs["password"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
2020-02-09 21:25:33 +01:00
arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
if err != nil {
return nil, err
}
}
args["password"] = arg2
return args, nil
}
2020-02-16 12:22:00 +01:00
func (ec *executionContext) field_Mutation_updateUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["id"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
2020-02-16 12:22:00 +01:00
if err != nil {
return nil, err
}
}
args["id"] = arg0
var arg1 *string
if tmp, ok := rawArgs["username"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
2020-02-16 12:22:00 +01:00
arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
if err != nil {
return nil, err
}
}
args["username"] = arg1
var arg2 *string
2020-02-22 14:05:33 +01:00
if tmp, ok := rawArgs["password"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
2020-02-22 14:05:33 +01:00
if err != nil {
return nil, err
}
}
args["password"] = arg2
var arg3 *bool
2020-02-16 12:22:00 +01:00
if tmp, ok := rawArgs["admin"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("admin"))
arg3, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
2020-02-16 12:22:00 +01:00
if err != nil {
return nil, err
}
}
args["admin"] = arg3
2020-02-16 12:22:00 +01:00
return args, nil
}
func (ec *executionContext) field_Mutation_userAddRootPath_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["id"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["id"] = arg0
var arg1 string
if tmp, ok := rawArgs["rootPath"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rootPath"))
arg1, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["rootPath"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_userRemoveRootAlbum_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["userId"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userId"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["userId"] = arg0
var arg1 int
if tmp, ok := rawArgs["albumId"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("albumId"))
arg1, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["albumId"] = arg1
return args, nil
}
2020-01-30 14:28:14 +01:00
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"))
2020-01-30 14:28:14 +01:00
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["name"] = arg0
return args, nil
}
2020-02-01 14:52:27 +01:00
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{}{}
2020-02-09 21:25:33 +01:00
var arg0 int
2020-02-01 14:52:27 +01:00
if tmp, ok := rawArgs["id"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
2020-02-01 14:52:27 +01:00
if err != nil {
return nil, err
}
}
args["id"] = arg0
var arg1 *models.ShareTokenCredentials
if tmp, ok := rawArgs["tokenCredentials"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tokenCredentials"))
arg1, err = ec.unmarshalOShareTokenCredentials2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenCredentials(ctx, tmp)
if err != nil {
return nil, err
}
}
args["tokenCredentials"] = arg1
2020-02-01 14:52:27 +01:00
return args, nil
}
2021-02-25 20:39:24 +01:00
func (ec *executionContext) field_Query_faceGroup_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["id"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_mediaList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 []int
if tmp, ok := rawArgs["ids"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ids"))
arg0, err = ec.unmarshalNID2ᚕintᚄ(ctx, tmp)
if err != nil {
return nil, err
}
}
args["ids"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_media_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["id"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
arg0, err = ec.unmarshalNID2int(ctx, tmp)
if err != nil {
return nil, err
}
}
args["id"] = arg0
var arg1 *models.ShareTokenCredentials
if tmp, ok := rawArgs["tokenCredentials"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tokenCredentials"))
arg1, err = ec.unmarshalOShareTokenCredentials2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenCredentials(ctx, tmp)
if err != nil {
return nil, err
}
}
args["tokenCredentials"] = arg1
return args, nil
}
2020-02-09 15:26:59 +01:00
func (ec *executionContext) field_Query_myAlbums_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *models.Ordering
if tmp, ok := rawArgs["order"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
arg0, err = ec.unmarshalOOrdering2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐOrdering(ctx, tmp)
2020-02-09 15:26:59 +01:00
if err != nil {
return nil, err
}
}
args["order"] = arg0
var arg1 *models.Pagination
if tmp, ok := rawArgs["paginate"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paginate"))
arg1, err = ec.unmarshalOPagination2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPagination(ctx, tmp)
if err != nil {
return nil, err
}
}
args["paginate"] = arg1
var arg2 *bool
2020-02-20 17:14:11 +01:00
if tmp, ok := rawArgs["onlyRoot"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("onlyRoot"))
arg2, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
2020-02-20 17:14:11 +01:00
if err != nil {
return nil, err
}
}
args["onlyRoot"] = arg2
var arg3 *bool
2020-02-20 17:14:11 +01:00
if tmp, ok := rawArgs["showEmpty"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("showEmpty"))
arg3, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
2020-02-20 17:14:11 +01:00
if err != nil {
return nil, err
}
}
args["showEmpty"] = arg3
var arg4 *bool
if tmp, ok := rawArgs["onlyWithFavorites"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("onlyWithFavorites"))
arg4, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
if err != nil {
return nil, err
}
}
args["onlyWithFavorites"] = arg4
2020-02-09 15:26:59 +01:00
return args, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) field_Query_myFaceGroups_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *models.Pagination
if tmp, ok := rawArgs["paginate"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paginate"))
arg0, err = ec.unmarshalOPagination2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPagination(ctx, tmp)
if err != nil {
return nil, err
}
}
args["paginate"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_myMedia_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
2020-02-09 15:26:59 +01:00
var err error
args := map[string]interface{}{}
var arg0 *models.Ordering
if tmp, ok := rawArgs["order"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
arg0, err = ec.unmarshalOOrdering2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐOrdering(ctx, tmp)
2020-02-09 15:26:59 +01:00
if err != nil {
return nil, err
}
}
args["order"] = arg0
var arg1 *models.Pagination
if tmp, ok := rawArgs["paginate"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paginate"))
arg1, err = ec.unmarshalOPagination2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPagination(ctx, tmp)
if err != nil {
return nil, err
}
}
args["paginate"] = arg1
2020-02-09 15:26:59 +01:00
return args, nil
}
2021-02-07 17:13:27 +01:00
func (ec *executionContext) field_Query_myTimeline_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *models.Pagination
if tmp, ok := rawArgs["paginate"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paginate"))
arg0, err = ec.unmarshalOPagination2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPagination(ctx, tmp)
2021-02-12 17:44:32 +01:00
if err != nil {
return nil, err
}
}
args["paginate"] = arg0
var arg1 *bool
2021-02-07 17:13:27 +01:00
if tmp, ok := rawArgs["onlyFavorites"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("onlyFavorites"))
arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp)
2021-02-07 17:13:27 +01:00
if err != nil {
return nil, err
}
}
args["onlyFavorites"] = arg1
2021-09-18 20:17:24 +02:00
var arg2 *time.Time
if tmp, ok := rawArgs["fromDate"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fromDate"))
arg2, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, tmp)
if err != nil {
return nil, err
}
}
args["fromDate"] = arg2
2021-02-07 17:13:27 +01:00
return args, nil
}
2020-03-05 11:53:42 +01:00
func (ec *executionContext) field_Query_search_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["query"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("query"))
2020-03-05 11:53:42 +01:00
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["query"] = arg0
var arg1 *int
if tmp, ok := rawArgs["limitMedia"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limitMedia"))
2020-03-05 11:53:42 +01:00
arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
if err != nil {
return nil, err
}
}
args["limitMedia"] = arg1
2020-03-05 11:53:42 +01:00
var arg2 *int
if tmp, ok := rawArgs["limitAlbums"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limitAlbums"))
2020-03-05 11:53:42 +01:00
arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
if err != nil {
return nil, err
}
}
args["limitAlbums"] = arg2
return args, nil
}
2020-06-14 20:56:48 +02:00
func (ec *executionContext) field_Query_shareTokenValidatePassword_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 models.ShareTokenCredentials
if tmp, ok := rawArgs["credentials"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("credentials"))
arg0, err = ec.unmarshalNShareTokenCredentials2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenCredentials(ctx, tmp)
if err != nil {
return nil, err
}
}
args["credentials"] = arg0
return args, nil
}
2020-02-11 14:32:35 +01:00
func (ec *executionContext) field_Query_shareToken_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
2020-02-01 14:52:27 +01:00
var err error
args := map[string]interface{}{}
var arg0 models.ShareTokenCredentials
if tmp, ok := rawArgs["credentials"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("credentials"))
arg0, err = ec.unmarshalNShareTokenCredentials2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenCredentials(ctx, tmp)
2020-02-01 14:52:27 +01:00
if err != nil {
return nil, err
}
}
args["credentials"] = arg0
2020-02-01 14:52:27 +01:00
return args, nil
}
2020-02-15 22:13:02 +01:00
func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
2020-02-09 15:26:59 +01:00
var err error
args := map[string]interface{}{}
var arg0 *models.Ordering
if tmp, ok := rawArgs["order"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
arg0, err = ec.unmarshalOOrdering2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐOrdering(ctx, tmp)
2020-02-09 15:26:59 +01:00
if err != nil {
return nil, err
}
}
args["order"] = arg0
var arg1 *models.Pagination
if tmp, ok := rawArgs["paginate"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paginate"))
arg1, err = ec.unmarshalOPagination2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPagination(ctx, tmp)
if err != nil {
return nil, err
}
}
args["paginate"] = arg1
2020-02-09 15:26:59 +01:00
return args, nil
}
2020-01-30 14:28:14 +01:00
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"))
2020-01-30 14:28:14 +01:00
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"))
2020-01-30 14:28:14 +01:00
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 *****************************
2020-02-01 14:52:27 +01:00
func (ec *executionContext) _Album_id(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_id(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ID, nil
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
2020-02-09 21:25:33 +01:00
res := resTmp.(int)
fc.Result = res
return ec.marshalNID2int(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_Album_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ID does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) _Album_title(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_title(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-02-01 14:52:27 +01:00
return obj.Title, nil
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-01-30 14:28:14 +01:00
return graphql.Null
}
2020-02-05 16:14:21 +01:00
res := resTmp.(string)
fc.Result = res
2020-02-09 12:53:21 +01:00
return ec.marshalNString2string(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_Album_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) _Album_media(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_media(ctx, field)
2020-02-09 15:26:59 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Album().Media(rctx, obj, fc.Args["order"].(*models.Ordering), fc.Args["paginate"].(*models.Pagination), fc.Args["onlyFavorites"].(*bool))
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-01-30 14:28:14 +01:00
return graphql.Null
}
res := resTmp.([]*models.Media)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMedia2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaᚄ(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_Album_media(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
2020-01-30 14:28:14 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Album_media_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2020-02-09 16:16:41 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Album_subAlbums(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_subAlbums(ctx, field)
if err != nil {
2020-02-09 16:16:41 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Album().SubAlbums(rctx, obj, fc.Args["order"].(*models.Ordering), fc.Args["paginate"].(*models.Pagination))
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-01-30 14:28:14 +01:00
return graphql.Null
}
2020-02-01 14:52:27 +01:00
res := resTmp.([]*models.Album)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_Album_subAlbums(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
2020-01-30 14:28:14 +01:00
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Album_subAlbums_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) _Album_parentAlbum(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_parentAlbum(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-11-27 16:02:10 +01:00
return obj.ParentAlbum, nil
2020-02-01 14:52:27 +01:00
})
2020-01-30 14:28:14 +01:00
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
2020-02-01 14:52:27 +01:00
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.Album)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalOAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Album_parentAlbum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
return fc, nil
}
2020-02-01 14:52:27 +01:00
func (ec *executionContext) _Album_owner(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_owner(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-12-22 01:14:43 +01:00
return ec.resolvers.Album().Owner(rctx, obj)
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
2020-12-22 01:14:43 +01:00
res := resTmp.(*models.User)
fc.Result = res
2020-12-22 01:14:43 +01:00
return ec.marshalNUser2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_Album_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_User_id(ctx, field)
case "username":
return ec.fieldContext_User_username(ctx, field)
case "albums":
return ec.fieldContext_User_albums(ctx, field)
case "rootAlbums":
return ec.fieldContext_User_rootAlbums(ctx, field)
case "admin":
return ec.fieldContext_User_admin(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
2020-03-07 16:19:27 +01:00
func (ec *executionContext) _Album_filePath(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_filePath(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2020-02-01 14:52:27 +01:00
ctx = rctx // use context from middleware stack in children
2020-03-07 16:19:27 +01:00
return obj.FilePath(), nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-02-01 14:52:27 +01:00
return graphql.Null
}
2020-02-05 16:14:21 +01:00
res := resTmp.(string)
fc.Result = res
2020-02-09 12:53:21 +01:00
return ec.marshalNString2string(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
2020-01-31 23:30:34 +01:00
func (ec *executionContext) fieldContext_Album_filePath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
2020-02-09 16:16:41 +01:00
func (ec *executionContext) _Album_thumbnail(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_thumbnail(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-09 16:16:41 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Album().Thumbnail(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.Media)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalOMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx, field.Selections, res)
2020-02-09 16:16:41 +01:00
}
func (ec *executionContext) fieldContext_Album_thumbnail(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _Album_path(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_path(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-02-16 12:01:10 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Album().Path(rctx, obj)
})
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.([]*models.Album)
fc.Result = res
return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Album_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _Album_shares(ctx context.Context, field graphql.CollectedField, obj *models.Album) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Album_shares(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-02-16 12:01:10 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Album().Shares(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-17 22:14:17 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2021-02-16 12:01:10 +01:00
return graphql.Null
}
res := resTmp.([]*models.ShareToken)
fc.Result = res
2021-04-17 22:14:17 +02:00
return ec.marshalNShareToken2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenᚄ(ctx, field.Selections, res)
2021-02-16 12:01:10 +01:00
}
func (ec *executionContext) fieldContext_Album_shares(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Album",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ShareToken_id(ctx, field)
case "token":
return ec.fieldContext_ShareToken_token(ctx, field)
case "owner":
return ec.fieldContext_ShareToken_owner(ctx, field)
case "expire":
return ec.fieldContext_ShareToken_expire(ctx, field)
case "hasPassword":
return ec.fieldContext_ShareToken_hasPassword(ctx, field)
case "album":
return ec.fieldContext_ShareToken_album(ctx, field)
case "media":
return ec.fieldContext_ShareToken_media(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ShareToken", field.Name)
},
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _AuthorizeResult_success(ctx context.Context, field graphql.CollectedField, obj *models.AuthorizeResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_AuthorizeResult_success(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-02-16 12:01:10 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Success, 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) fieldContext_AuthorizeResult_success(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-16 12:01:10 +01:00
Object: "AuthorizeResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
2021-02-16 12:01:10 +01:00
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _AuthorizeResult_status(ctx context.Context, field graphql.CollectedField, obj *models.AuthorizeResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_AuthorizeResult_status(ctx, field)
if err != nil {
return graphql.Null
}
2021-02-16 12:01:10 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-16 12:01:10 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Status, 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) fieldContext_AuthorizeResult_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-16 12:01:10 +01:00
Object: "AuthorizeResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2021-02-16 12:01:10 +01:00
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _AuthorizeResult_token(ctx context.Context, field graphql.CollectedField, obj *models.AuthorizeResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_AuthorizeResult_token(ctx, field)
2021-02-16 12:01:10 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Token, nil
})
if err != nil {
ec.Error(ctx, err)
2021-02-16 12:01:10 +01:00
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) fieldContext_AuthorizeResult_token(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "AuthorizeResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Coordinates_latitude(ctx context.Context, field graphql.CollectedField, obj *models.Coordinates) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Coordinates_latitude(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Latitude, 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.(float64)
fc.Result = res
return ec.marshalNFloat2float64(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Coordinates_latitude(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Coordinates",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Coordinates_longitude(ctx context.Context, field graphql.CollectedField, obj *models.Coordinates) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Coordinates_longitude(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Longitude, 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.(float64)
fc.Result = res
return ec.marshalNFloat2float64(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Coordinates_longitude(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Coordinates",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _FaceGroup_id(ctx context.Context, field graphql.CollectedField, obj *models.FaceGroup) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_FaceGroup_id(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-02-16 12:01:10 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ID, 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.marshalNID2int(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_FaceGroup_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-16 12:01:10 +01:00
Object: "FaceGroup",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ID does not have child fields")
},
2021-02-16 12:01:10 +01:00
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _FaceGroup_label(ctx context.Context, field graphql.CollectedField, obj *models.FaceGroup) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_FaceGroup_label(ctx, field)
if err != nil {
return graphql.Null
}
2021-02-16 12:01:10 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-16 12:01:10 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Label, 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) fieldContext_FaceGroup_label(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-16 12:01:10 +01:00
Object: "FaceGroup",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2021-02-16 12:01:10 +01:00
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _FaceGroup_imageFaces(ctx context.Context, field graphql.CollectedField, obj *models.FaceGroup) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_FaceGroup_imageFaces(ctx, field)
2021-02-25 18:48:59 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-16 12:01:10 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.FaceGroup().ImageFaces(rctx, obj, fc.Args["paginate"].(*models.Pagination))
2021-02-16 12:01:10 +01:00
})
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
}
2021-02-25 18:48:59 +01:00
res := resTmp.([]*models.ImageFace)
2021-02-16 12:01:10 +01:00
fc.Result = res
2021-02-25 18:48:59 +01:00
return ec.marshalNImageFace2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐImageFaceᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_FaceGroup_imageFaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-25 18:48:59 +01:00
Object: "FaceGroup",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ImageFace_id(ctx, field)
case "media":
return ec.fieldContext_ImageFace_media(ctx, field)
case "rectangle":
return ec.fieldContext_ImageFace_rectangle(ctx, field)
case "faceGroup":
return ec.fieldContext_ImageFace_faceGroup(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ImageFace", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_FaceGroup_imageFaces_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2021-02-25 18:48:59 +01:00
}
return fc, nil
}
2021-02-25 18:48:59 +01:00
func (ec *executionContext) _FaceGroup_imageFaceCount(ctx context.Context, field graphql.CollectedField, obj *models.FaceGroup) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_FaceGroup_imageFaceCount(ctx, field)
if err != nil {
return graphql.Null
}
2021-02-25 18:48:59 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-25 18:48:59 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.FaceGroup().ImageFaceCount(rctx, obj)
})
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)
2021-02-16 12:01:10 +01:00
}
func (ec *executionContext) fieldContext_FaceGroup_imageFaceCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "FaceGroup",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _FaceRectangle_minX(ctx context.Context, field graphql.CollectedField, obj *models.FaceRectangle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_FaceRectangle_minX(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-02-16 12:01:10 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MinX, 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.(float64)
fc.Result = res
return ec.marshalNFloat2float64(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_FaceRectangle_minX(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-16 12:01:10 +01:00
Object: "FaceRectangle",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2021-02-16 12:01:10 +01:00
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _FaceRectangle_maxX(ctx context.Context, field graphql.CollectedField, obj *models.FaceRectangle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_FaceRectangle_maxX(ctx, field)
if err != nil {
return graphql.Null
}
2021-02-16 12:01:10 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-16 12:01:10 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MaxX, 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.(float64)
fc.Result = res
return ec.marshalNFloat2float64(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_FaceRectangle_maxX(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-16 12:01:10 +01:00
Object: "FaceRectangle",
Field: field,
2021-02-16 12:01:10 +01:00
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2020-03-07 16:19:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _FaceRectangle_minY(ctx context.Context, field graphql.CollectedField, obj *models.FaceRectangle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_FaceRectangle_minY(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-03-07 16:19:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2021-02-16 12:01:10 +01:00
return obj.MinY, nil
2020-03-07 16:19:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-03-07 16:19:27 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
2021-02-16 12:01:10 +01:00
res := resTmp.(float64)
fc.Result = res
2021-02-16 12:01:10 +01:00
return ec.marshalNFloat2float64(ctx, field.Selections, res)
2020-03-07 16:19:27 +01:00
}
func (ec *executionContext) fieldContext_FaceRectangle_minY(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-16 12:01:10 +01:00
Object: "FaceRectangle",
Field: field,
2021-02-16 12:01:10 +01:00
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2020-02-11 14:32:35 +01:00
}
return fc, nil
}
func (ec *executionContext) _FaceRectangle_maxY(ctx context.Context, field graphql.CollectedField, obj *models.FaceRectangle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_FaceRectangle_maxY(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-11 14:32:35 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2021-02-16 12:01:10 +01:00
return obj.MaxY, nil
2020-02-11 14:32:35 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-02-16 12:01:10 +01:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-11 14:32:35 +01:00
return graphql.Null
}
2021-02-16 12:01:10 +01:00
res := resTmp.(float64)
fc.Result = res
2021-02-16 12:01:10 +01:00
return ec.marshalNFloat2float64(ctx, field.Selections, res)
2020-02-11 14:32:35 +01:00
}
func (ec *executionContext) fieldContext_FaceRectangle_maxY(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "FaceRectangle",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _ImageFace_id(ctx context.Context, field graphql.CollectedField, obj *models.ImageFace) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ImageFace_id(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
2020-01-31 23:30:34 +01:00
}
2020-02-01 14:52:27 +01:00
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2021-02-16 12:01:10 +01:00
return obj.ID, nil
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
2021-02-16 12:01:10 +01:00
res := resTmp.(int)
fc.Result = res
2021-02-16 12:01:10 +01:00
return ec.marshalNID2int(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_ImageFace_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ImageFace",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ID does not have child fields")
},
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _ImageFace_media(ctx context.Context, field graphql.CollectedField, obj *models.ImageFace) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ImageFace_media(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2021-10-19 23:28:23 +02:00
return ec.resolvers.ImageFace().Media(rctx, obj)
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-01 14:52:27 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
2021-10-19 23:28:23 +02:00
res := resTmp.(*models.Media)
fc.Result = res
2021-10-19 23:28:23 +02:00
return ec.marshalNMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_ImageFace_media(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ImageFace",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
}
return fc, nil
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) _ImageFace_rectangle(ctx context.Context, field graphql.CollectedField, obj *models.ImageFace) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ImageFace_rectangle(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2021-02-16 12:01:10 +01:00
return obj.Rectangle, nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-17 22:40:46 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-01 14:52:27 +01:00
return graphql.Null
}
2021-02-16 12:01:10 +01:00
res := resTmp.(models.FaceRectangle)
fc.Result = res
2021-04-17 22:40:46 +02:00
return ec.marshalNFaceRectangle2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceRectangle(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_ImageFace_rectangle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ImageFace",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "minX":
return ec.fieldContext_FaceRectangle_minX(ctx, field)
case "maxX":
return ec.fieldContext_FaceRectangle_maxX(ctx, field)
case "minY":
return ec.fieldContext_FaceRectangle_minY(ctx, field)
case "maxY":
return ec.fieldContext_FaceRectangle_maxY(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type FaceRectangle", field.Name)
},
}
return fc, nil
}
2021-02-19 23:30:43 +01:00
func (ec *executionContext) _ImageFace_faceGroup(ctx context.Context, field graphql.CollectedField, obj *models.ImageFace) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ImageFace_faceGroup(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-02-19 23:30:43 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.ImageFace().FaceGroup(rctx, obj)
})
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.(*models.FaceGroup)
fc.Result = res
return ec.marshalNFaceGroup2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroup(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_ImageFace_faceGroup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ImageFace",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_FaceGroup_id(ctx, field)
case "label":
return ec.fieldContext_FaceGroup_label(ctx, field)
case "imageFaces":
return ec.fieldContext_FaceGroup_imageFaces(ctx, field)
case "imageFaceCount":
return ec.fieldContext_FaceGroup_imageFaceCount(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type FaceGroup", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Media_id(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_id(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ID, nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-01 14:52:27 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(int)
fc.Result = res
return ec.marshalNID2int(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Media_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ID does not have child fields")
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _Media_title(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_title(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2020-02-09 12:53:21 +01:00
ctx = rctx // use context from middleware stack in children
return obj.Title, nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-01 14:52:27 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Media_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-02-05 16:49:51 +01:00
}
return fc, nil
}
func (ec *executionContext) _Media_path(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_path(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-05 16:49:51 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Path, nil
2020-02-05 16:49:51 +01:00
})
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")
}
2020-02-05 16:49:51 +01:00
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
2020-02-05 16:49:51 +01:00
}
func (ec *executionContext) fieldContext_Media_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Media_thumbnail(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_thumbnail(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 17:58:45 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Media().Thumbnail(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.MediaURL)
fc.Result = res
return ec.marshalOMediaURL2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaURL(ctx, field.Selections, res)
}
2020-02-16 12:22:00 +01:00
func (ec *executionContext) fieldContext_Media_thumbnail(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "url":
return ec.fieldContext_MediaURL_url(ctx, field)
case "width":
return ec.fieldContext_MediaURL_width(ctx, field)
case "height":
return ec.fieldContext_MediaURL_height(ctx, field)
case "fileSize":
return ec.fieldContext_MediaURL_fileSize(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type MediaURL", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Media_highRes(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_highRes(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Media().HighRes(rctx, obj)
2020-02-01 17:58:45 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.MediaURL)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalOMediaURL2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaURL(ctx, field.Selections, res)
2020-02-01 17:58:45 +01:00
}
func (ec *executionContext) fieldContext_Media_highRes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "url":
return ec.fieldContext_MediaURL_url(ctx, field)
case "width":
return ec.fieldContext_MediaURL_width(ctx, field)
case "height":
return ec.fieldContext_MediaURL_height(ctx, field)
case "fileSize":
return ec.fieldContext_MediaURL_fileSize(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type MediaURL", field.Name)
},
2020-07-11 15:57:58 +02:00
}
return fc, nil
}
2020-07-11 15:57:58 +02:00
func (ec *executionContext) _Media_videoWeb(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_videoWeb(ctx, field)
if err != nil {
return graphql.Null
}
2020-07-11 15:57:58 +02:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-07-11 15:57:58 +02:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Media().VideoWeb(rctx, obj)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.MediaURL)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalOMediaURL2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaURL(ctx, field.Selections, res)
2020-07-11 15:57:58 +02:00
}
func (ec *executionContext) fieldContext_Media_videoWeb(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
2021-09-18 20:17:24 +02:00
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "url":
return ec.fieldContext_MediaURL_url(ctx, field)
case "width":
return ec.fieldContext_MediaURL_width(ctx, field)
case "height":
return ec.fieldContext_MediaURL_height(ctx, field)
case "fileSize":
return ec.fieldContext_MediaURL_fileSize(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type MediaURL", field.Name)
},
2020-02-01 17:58:45 +01:00
}
return fc, nil
}
func (ec *executionContext) _Media_album(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_album(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 17:58:45 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2021-09-18 20:17:24 +02:00
return ec.resolvers.Media().Album(rctx, obj)
2020-02-01 17:58:45 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-01 17:58:45 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
2021-09-18 20:17:24 +02:00
res := resTmp.(*models.Album)
fc.Result = res
2021-09-18 20:17:24 +02:00
return ec.marshalNAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res)
2020-02-01 17:58:45 +01:00
}
func (ec *executionContext) fieldContext_Media_album(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Media_exif(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_exif(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-09 21:25:33 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2021-01-19 16:46:15 +01:00
return ec.resolvers.Media().Exif(rctx, obj)
2020-02-09 21:25:33 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
2020-11-28 17:31:19 +01:00
res := resTmp.(*models.MediaEXIF)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalOMediaEXIF2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaEXIF(ctx, field.Selections, res)
2020-02-09 21:25:33 +01:00
}
func (ec *executionContext) fieldContext_Media_exif(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_MediaEXIF_id(ctx, field)
case "media":
return ec.fieldContext_MediaEXIF_media(ctx, field)
case "description":
return ec.fieldContext_MediaEXIF_description(ctx, field)
case "camera":
return ec.fieldContext_MediaEXIF_camera(ctx, field)
case "maker":
return ec.fieldContext_MediaEXIF_maker(ctx, field)
case "lens":
return ec.fieldContext_MediaEXIF_lens(ctx, field)
case "dateShot":
return ec.fieldContext_MediaEXIF_dateShot(ctx, field)
case "exposure":
return ec.fieldContext_MediaEXIF_exposure(ctx, field)
case "aperture":
return ec.fieldContext_MediaEXIF_aperture(ctx, field)
case "iso":
return ec.fieldContext_MediaEXIF_iso(ctx, field)
case "focalLength":
return ec.fieldContext_MediaEXIF_focalLength(ctx, field)
case "flash":
return ec.fieldContext_MediaEXIF_flash(ctx, field)
case "exposureProgram":
return ec.fieldContext_MediaEXIF_exposureProgram(ctx, field)
case "coordinates":
return ec.fieldContext_MediaEXIF_coordinates(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type MediaEXIF", field.Name)
},
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _Media_videoMetadata(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_videoMetadata(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-07-12 14:17:49 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-11-27 16:02:10 +01:00
return obj.VideoMetadata, nil
2020-07-12 14:17:49 +02:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.VideoMetadata)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalOVideoMetadata2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐVideoMetadata(ctx, field.Selections, res)
2020-07-12 14:17:49 +02:00
}
func (ec *executionContext) fieldContext_Media_videoMetadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_VideoMetadata_id(ctx, field)
case "media":
return ec.fieldContext_VideoMetadata_media(ctx, field)
case "width":
return ec.fieldContext_VideoMetadata_width(ctx, field)
case "height":
return ec.fieldContext_VideoMetadata_height(ctx, field)
case "duration":
return ec.fieldContext_VideoMetadata_duration(ctx, field)
case "codec":
return ec.fieldContext_VideoMetadata_codec(ctx, field)
case "framerate":
return ec.fieldContext_VideoMetadata_framerate(ctx, field)
case "bitrate":
return ec.fieldContext_VideoMetadata_bitrate(ctx, field)
case "colorProfile":
return ec.fieldContext_VideoMetadata_colorProfile(ctx, field)
case "audio":
return ec.fieldContext_VideoMetadata_audio(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type VideoMetadata", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Media_favorite(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_favorite(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-09 21:25:33 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Media().Favorite(rctx, obj)
2020-02-09 21:25:33 +01:00
})
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")
}
2020-02-09 21:25:33 +01:00
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
2020-02-09 21:25:33 +01:00
}
func (ec *executionContext) fieldContext_Media_favorite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
2021-04-27 20:31:15 +02:00
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Media_type(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_type(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2021-04-27 20:31:15 +02:00
return ec.resolvers.Media().Type(rctx, obj)
})
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.(models.MediaType)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMediaType2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Media_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type MediaType does not have child fields")
},
}
return fc, nil
}
2021-09-18 20:17:24 +02:00
func (ec *executionContext) _Media_date(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_date(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-09-18 20:17:24 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Date(), 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.(time.Time)
fc.Result = res
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Media_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2022-02-01 23:39:19 +01:00
Object: "Media",
Field: field,
IsMethod: true,
2022-02-01 23:39:19 +01:00
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Time does not have child fields")
},
2022-02-01 23:39:19 +01:00
}
return fc, nil
}
2022-02-01 23:39:19 +01:00
func (ec *executionContext) _Media_blurhash(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_blurhash(ctx, field)
2022-02-01 23:39:19 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Blurhash, nil
})
if err != nil {
ec.Error(ctx, err)
2022-02-01 23:39:19 +01:00
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) fieldContext_Media_blurhash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Media_shares(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_shares(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-11 15:36:12 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Media().Shares(rctx, obj)
2020-02-11 15:36:12 +01:00
})
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")
}
2020-02-11 15:36:12 +01:00
return graphql.Null
}
res := resTmp.([]*models.ShareToken)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNShareToken2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenᚄ(ctx, field.Selections, res)
2020-02-11 15:36:12 +01:00
}
func (ec *executionContext) fieldContext_Media_shares(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ShareToken_id(ctx, field)
case "token":
return ec.fieldContext_ShareToken_token(ctx, field)
case "owner":
return ec.fieldContext_ShareToken_owner(ctx, field)
case "expire":
return ec.fieldContext_ShareToken_expire(ctx, field)
case "hasPassword":
return ec.fieldContext_ShareToken_hasPassword(ctx, field)
case "album":
return ec.fieldContext_ShareToken_album(ctx, field)
case "media":
return ec.fieldContext_ShareToken_media(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ShareToken", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Media_downloads(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_downloads(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Media().Downloads(rctx, obj)
})
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.([]*models.MediaDownload)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMediaDownload2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaDownloadᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Media_downloads(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-16 17:13:08 +01:00
Object: "Media",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "title":
return ec.fieldContext_MediaDownload_title(ctx, field)
case "mediaUrl":
return ec.fieldContext_MediaDownload_mediaUrl(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type MediaDownload", field.Name)
},
2021-02-16 17:13:08 +01:00
}
return fc, nil
}
2021-02-16 17:13:08 +01:00
func (ec *executionContext) _Media_faces(ctx context.Context, field graphql.CollectedField, obj *models.Media) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Media_faces(ctx, field)
if err != nil {
return graphql.Null
}
2021-02-16 17:13:08 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-16 17:13:08 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Media().Faces(rctx, obj)
})
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.([]*models.ImageFace)
fc.Result = res
return ec.marshalNImageFace2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐImageFaceᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Media_faces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Media",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ImageFace_id(ctx, field)
case "media":
return ec.fieldContext_ImageFace_media(ctx, field)
case "rectangle":
return ec.fieldContext_ImageFace_rectangle(ctx, field)
case "faceGroup":
return ec.fieldContext_ImageFace_faceGroup(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ImageFace", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _MediaDownload_title(ctx context.Context, field graphql.CollectedField, obj *models.MediaDownload) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaDownload_title(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-06-17 18:00:58 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Title, nil
2020-06-17 18:00:58 +02:00
})
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")
}
2020-06-17 18:00:58 +02:00
return graphql.Null
}
res := resTmp.(string)
2020-06-17 18:00:58 +02:00
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
2020-06-17 18:00:58 +02:00
}
func (ec *executionContext) fieldContext_MediaDownload_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaDownload",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-02-16 12:22:00 +01:00
}
return fc, nil
}
func (ec *executionContext) _MediaDownload_mediaUrl(ctx context.Context, field graphql.CollectedField, obj *models.MediaDownload) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaDownload_mediaUrl(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-16 12:22:00 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MediaURL, nil
2020-02-16 12:22:00 +01:00
})
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")
}
2020-02-16 12:22:00 +01:00
return graphql.Null
}
res := resTmp.(*models.MediaURL)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMediaURL2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaURL(ctx, field.Selections, res)
2020-02-16 12:22:00 +01:00
}
func (ec *executionContext) fieldContext_MediaDownload_mediaUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaDownload",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "url":
return ec.fieldContext_MediaURL_url(ctx, field)
case "width":
return ec.fieldContext_MediaURL_width(ctx, field)
case "height":
return ec.fieldContext_MediaURL_height(ctx, field)
case "fileSize":
return ec.fieldContext_MediaURL_fileSize(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type MediaURL", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_id(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_id(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ID, 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.marshalNID2int(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_MediaEXIF_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ID does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_media(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_media(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Media(), 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.(*models.Media)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_MediaEXIF_media(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
}
return fc, nil
}
2022-03-28 17:08:30 +02:00
func (ec *executionContext) _MediaEXIF_description(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_description(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2022-03-28 17:08:30 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_MediaEXIF_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_camera(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_camera(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Camera, 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) fieldContext_MediaEXIF_camera(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_maker(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_maker(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Maker, 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) fieldContext_MediaEXIF_maker(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_lens(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_lens(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Lens, 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) fieldContext_MediaEXIF_lens(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_dateShot(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_dateShot(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DateShot, 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) fieldContext_MediaEXIF_dateShot(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Time does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_exposure(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_exposure(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Exposure, nil
})
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) fieldContext_MediaEXIF_exposure(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2020-02-26 19:44:47 +01:00
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_aperture(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_aperture(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-26 19:44:47 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Aperture, nil
2020-02-26 19:44:47 +01:00
})
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)
2020-02-26 19:44:47 +01:00
}
func (ec *executionContext) fieldContext_MediaEXIF_aperture(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_iso(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_iso(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Iso, nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int64)
fc.Result = res
return ec.marshalOInt2ᚖint64(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_MediaEXIF_iso(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_focalLength(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_focalLength(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.FocalLength, nil
2020-02-01 14:52:27 +01:00
})
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)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_MediaEXIF_focalLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_flash(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_flash(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Flash, nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int64)
fc.Result = res
return ec.marshalOInt2ᚖint64(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_MediaEXIF_flash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_exposureProgram(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_exposureProgram(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ExposureProgram, nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int64)
fc.Result = res
return ec.marshalOInt2ᚖint64(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_MediaEXIF_exposureProgram(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _MediaEXIF_coordinates(ctx context.Context, field graphql.CollectedField, obj *models.MediaEXIF) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaEXIF_coordinates(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Coordinates(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.Coordinates)
fc.Result = res
return ec.marshalOCoordinates2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐCoordinates(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_MediaEXIF_coordinates(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaEXIF",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "latitude":
return ec.fieldContext_Coordinates_latitude(ctx, field)
case "longitude":
return ec.fieldContext_Coordinates_longitude(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Coordinates", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _MediaURL_url(ctx context.Context, field graphql.CollectedField, obj *models.MediaURL) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaURL_url(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.URL(), nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-02-01 14:52:27 +01:00
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
2020-02-09 12:53:21 +01:00
}
func (ec *executionContext) fieldContext_MediaURL_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaURL",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _MediaURL_width(ctx context.Context, field graphql.CollectedField, obj *models.MediaURL) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaURL_width(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-09 12:53:21 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Width, nil
2020-02-09 12:53:21 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(int)
fc.Result = res
return ec.marshalNInt2int(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_MediaURL_width(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaURL",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _MediaURL_height(ctx context.Context, field graphql.CollectedField, obj *models.MediaURL) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaURL_height(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Height, nil
2020-02-10 12:05:58 +01:00
})
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")
}
2020-02-10 12:05:58 +01:00
return graphql.Null
}
res := resTmp.(int)
fc.Result = res
return ec.marshalNInt2int(ctx, field.Selections, res)
2020-02-10 12:05:58 +01:00
}
func (ec *executionContext) fieldContext_MediaURL_height(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaURL",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _MediaURL_fileSize(ctx context.Context, field graphql.CollectedField, obj *models.MediaURL) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_MediaURL_fileSize(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.FileSize, 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
}
2020-11-27 16:02:10 +01:00
res := resTmp.(int64)
fc.Result = res
2020-11-27 16:02:10 +01:00
return ec.marshalNInt2int64(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_MediaURL_fileSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "MediaURL",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Mutation_authorizeUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_authorizeUser(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-06-17 18:00:58 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().AuthorizeUser(rctx, fc.Args["username"].(string), fc.Args["password"].(string))
2020-06-17 18:00:58 +02:00
})
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.(*models.AuthorizeResult)
2020-06-17 18:00:58 +02:00
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNAuthorizeResult2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAuthorizeResult(ctx, field.Selections, res)
2020-06-17 18:00:58 +02:00
}
func (ec *executionContext) fieldContext_Mutation_authorizeUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "success":
return ec.fieldContext_AuthorizeResult_success(ctx, field)
case "status":
return ec.fieldContext_AuthorizeResult_status(ctx, field)
case "token":
return ec.fieldContext_AuthorizeResult_token(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type AuthorizeResult", field.Name)
},
2020-02-02 00:29:42 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_authorizeUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_initialSetupWizard(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_initialSetupWizard(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().InitialSetupWizard(rctx, fc.Args["username"].(string), fc.Args["password"].(string), fc.Args["rootPath"].(string))
2020-02-02 00:29:42 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.AuthorizeResult)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalOAuthorizeResult2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAuthorizeResult(ctx, field.Selections, res)
2020-02-10 12:05:58 +01:00
}
func (ec *executionContext) fieldContext_Mutation_initialSetupWizard(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "success":
return ec.fieldContext_AuthorizeResult_success(ctx, field)
case "status":
return ec.fieldContext_AuthorizeResult_status(ctx, field)
case "token":
return ec.fieldContext_AuthorizeResult_token(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type AuthorizeResult", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_initialSetupWizard_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2020-02-10 12:05:58 +01:00
}
return fc, nil
}
func (ec *executionContext) _Mutation_scanAll(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_scanAll(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-10 12:05:58 +01:00
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().ScanAll(rctx)
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.ScannerResult); ok {
return data, nil
}
2020-12-17 22:51:43 +01:00
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.ScannerResult`, tmp)
2020-02-10 12:05:58 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-10 12:05:58 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*models.ScannerResult)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNScannerResult2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐScannerResult(ctx, field.Selections, res)
2020-02-10 12:05:58 +01:00
}
func (ec *executionContext) fieldContext_Mutation_scanAll(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "finished":
return ec.fieldContext_ScannerResult_finished(ctx, field)
case "success":
return ec.fieldContext_ScannerResult_success(ctx, field)
case "progress":
return ec.fieldContext_ScannerResult_progress(ctx, field)
case "message":
return ec.fieldContext_ScannerResult_message(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ScannerResult", field.Name)
},
2020-02-21 22:42:39 +01:00
}
return fc, nil
}
func (ec *executionContext) _Mutation_scanUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_scanUser(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-21 22:42:39 +01:00
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().ScanUser(rctx, fc.Args["userId"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.ScannerResult); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.ScannerResult`, tmp)
2020-02-21 22:42:39 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-21 22:42:39 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*models.ScannerResult)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNScannerResult2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐScannerResult(ctx, field.Selections, res)
2020-02-21 22:42:39 +01:00
}
func (ec *executionContext) fieldContext_Mutation_scanUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "finished":
return ec.fieldContext_ScannerResult_finished(ctx, field)
case "success":
return ec.fieldContext_ScannerResult_success(ctx, field)
case "progress":
return ec.fieldContext_ScannerResult_progress(ctx, field)
case "message":
return ec.fieldContext_ScannerResult_message(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ScannerResult", field.Name)
},
2020-02-21 22:42:39 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_scanUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_shareAlbum(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_shareAlbum(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-21 22:42:39 +01:00
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().ShareAlbum(rctx, fc.Args["albumId"].(int), fc.Args["expire"].(*time.Time), fc.Args["password"].(*string))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.ShareToken); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.ShareToken`, tmp)
2020-02-21 22:42:39 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-13 19:57:33 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-21 22:42:39 +01:00
return graphql.Null
}
res := resTmp.(*models.ShareToken)
fc.Result = res
2021-04-13 19:57:33 +02:00
return ec.marshalNShareToken2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res)
2020-02-21 22:42:39 +01:00
}
func (ec *executionContext) fieldContext_Mutation_shareAlbum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ShareToken_id(ctx, field)
case "token":
return ec.fieldContext_ShareToken_token(ctx, field)
case "owner":
return ec.fieldContext_ShareToken_owner(ctx, field)
case "expire":
return ec.fieldContext_ShareToken_expire(ctx, field)
case "hasPassword":
return ec.fieldContext_ShareToken_hasPassword(ctx, field)
case "album":
return ec.fieldContext_ShareToken_album(ctx, field)
case "media":
return ec.fieldContext_ShareToken_media(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ShareToken", field.Name)
},
2020-02-10 12:05:58 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_shareAlbum_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_shareMedia(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_shareMedia(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-10 12:05:58 +01:00
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().ShareMedia(rctx, fc.Args["mediaId"].(int), fc.Args["expire"].(*time.Time), fc.Args["password"].(*string))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.ShareToken); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.ShareToken`, tmp)
2020-02-10 12:05:58 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-13 19:57:33 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-10 12:05:58 +01:00
return graphql.Null
}
res := resTmp.(*models.ShareToken)
fc.Result = res
2021-04-13 19:57:33 +02:00
return ec.marshalNShareToken2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Mutation_shareMedia(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ShareToken_id(ctx, field)
case "token":
return ec.fieldContext_ShareToken_token(ctx, field)
case "owner":
return ec.fieldContext_ShareToken_owner(ctx, field)
case "expire":
return ec.fieldContext_ShareToken_expire(ctx, field)
case "hasPassword":
return ec.fieldContext_ShareToken_hasPassword(ctx, field)
case "album":
return ec.fieldContext_ShareToken_album(ctx, field)
case "media":
return ec.fieldContext_ShareToken_media(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ShareToken", field.Name)
},
2020-02-02 00:29:42 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_shareMedia_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteShareToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteShareToken(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
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().DeleteShareToken(rctx, fc.Args["token"].(string))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.ShareToken); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.ShareToken`, tmp)
2020-02-24 23:30:08 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-13 19:57:33 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-24 23:30:08 +01:00
return graphql.Null
}
res := resTmp.(*models.ShareToken)
fc.Result = res
2021-04-13 19:57:33 +02:00
return ec.marshalNShareToken2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res)
2020-02-24 23:30:08 +01:00
}
func (ec *executionContext) fieldContext_Mutation_deleteShareToken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ShareToken_id(ctx, field)
case "token":
return ec.fieldContext_ShareToken_token(ctx, field)
case "owner":
return ec.fieldContext_ShareToken_owner(ctx, field)
case "expire":
return ec.fieldContext_ShareToken_expire(ctx, field)
case "hasPassword":
return ec.fieldContext_ShareToken_hasPassword(ctx, field)
case "album":
return ec.fieldContext_ShareToken_album(ctx, field)
case "media":
return ec.fieldContext_ShareToken_media(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ShareToken", field.Name)
},
2020-02-24 23:30:08 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_deleteShareToken_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_protectShareToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_protectShareToken(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-24 23:30:08 +01:00
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().ProtectShareToken(rctx, fc.Args["token"].(string), fc.Args["password"].(*string))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.ShareToken); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.ShareToken`, tmp)
2020-02-02 00:29:42 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-13 19:57:33 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-02 00:29:42 +01:00
return graphql.Null
}
res := resTmp.(*models.ShareToken)
fc.Result = res
2021-04-13 19:57:33 +02:00
return ec.marshalNShareToken2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Mutation_protectShareToken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ShareToken_id(ctx, field)
case "token":
return ec.fieldContext_ShareToken_token(ctx, field)
case "owner":
return ec.fieldContext_ShareToken_owner(ctx, field)
case "expire":
return ec.fieldContext_ShareToken_expire(ctx, field)
case "hasPassword":
return ec.fieldContext_ShareToken_hasPassword(ctx, field)
case "album":
return ec.fieldContext_ShareToken_album(ctx, field)
case "media":
return ec.fieldContext_ShareToken_media(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ShareToken", field.Name)
},
2020-02-02 00:29:42 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_protectShareToken_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_favoriteMedia(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_favoriteMedia(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
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().FavoriteMedia(rctx, fc.Args["mediaId"].(int), fc.Args["favorite"].(bool))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.Media); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.Media`, tmp)
2020-02-02 00:29:42 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-13 19:57:33 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-02 00:29:42 +01:00
return graphql.Null
}
res := resTmp.(*models.Media)
fc.Result = res
2021-04-13 19:57:33 +02:00
return ec.marshalNMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Mutation_favoriteMedia(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
2020-02-02 00:29:42 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_favoriteMedia_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_updateUser(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
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().UpdateUser(rctx, fc.Args["id"].(int), fc.Args["username"].(*string), fc.Args["password"].(*string), fc.Args["admin"].(*bool))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.User); ok {
return data, nil
}
2020-12-17 22:51:43 +01:00
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.User`, tmp)
2020-02-02 00:29:42 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-13 19:57:33 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-02 00:29:42 +01:00
return graphql.Null
}
res := resTmp.(*models.User)
fc.Result = res
2021-04-13 19:57:33 +02:00
return ec.marshalNUser2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_User_id(ctx, field)
case "username":
return ec.fieldContext_User_username(ctx, field)
case "albums":
return ec.fieldContext_User_albums(ctx, field)
case "rootAlbums":
return ec.fieldContext_User_rootAlbums(ctx, field)
case "admin":
return ec.fieldContext_User_admin(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
2020-02-02 00:29:42 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_updateUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_createUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_createUser(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
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, fc.Args["username"].(string), fc.Args["password"].(*string), fc.Args["admin"].(bool))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.User); ok {
return data, nil
}
2020-12-17 22:51:43 +01:00
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.User`, tmp)
2020-02-02 00:29:42 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-13 19:57:33 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-02 00:29:42 +01:00
return graphql.Null
}
res := resTmp.(*models.User)
fc.Result = res
2021-04-13 19:57:33 +02:00
return ec.marshalNUser2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Mutation_createUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_User_id(ctx, field)
case "username":
return ec.fieldContext_User_username(ctx, field)
case "albums":
return ec.fieldContext_User_albums(ctx, field)
case "rootAlbums":
return ec.fieldContext_User_rootAlbums(ctx, field)
case "admin":
return ec.fieldContext_User_admin(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
2020-02-02 00:29:42 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_createUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2020-02-02 00:29:42 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteUser(ctx, field)
if err != nil {
2020-02-02 00:29:42 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().DeleteUser(rctx, fc.Args["id"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
2020-02-02 00:29:42 +01:00
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.User); ok {
return data, nil
}
2020-12-17 22:51:43 +01:00
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.User`, tmp)
2020-02-02 00:29:42 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2021-04-13 19:57:33 +02:00
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
2020-02-02 00:29:42 +01:00
return graphql.Null
}
res := resTmp.(*models.User)
fc.Result = res
2021-04-13 19:57:33 +02:00
return ec.marshalNUser2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Mutation_deleteUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_User_id(ctx, field)
case "username":
return ec.fieldContext_User_username(ctx, field)
case "albums":
return ec.fieldContext_User_albums(ctx, field)
case "rootAlbums":
return ec.fieldContext_User_rootAlbums(ctx, field)
case "admin":
return ec.fieldContext_User_admin(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_deleteUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_userAddRootPath(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_userAddRootPath(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().UserAddRootPath(rctx, fc.Args["id"].(int), fc.Args["rootPath"].(string))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.Album); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.Album`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.Album)
fc.Result = res
return ec.marshalOAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_userAddRootPath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_userAddRootPath_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_userRemoveRootAlbum(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_userRemoveRootAlbum(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().UserRemoveRootAlbum(rctx, fc.Args["userId"].(int), fc.Args["albumId"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.Album); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.Album`, tmp)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.Album)
fc.Result = res
return ec.marshalOAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_userRemoveRootAlbum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
2020-09-21 11:50:39 +02:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
2020-09-21 11:50:39 +02:00
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_userRemoveRootAlbum_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2020-09-21 11:50:39 +02:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_setPeriodicScanInterval(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_setPeriodicScanInterval(ctx, field)
if err != nil {
2020-09-21 11:50:39 +02:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-09-21 11:50:39 +02:00
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().SetPeriodicScanInterval(rctx, fc.Args["interval"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(int); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be int`, tmp)
2020-09-21 11:50:39 +02:00
})
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) fieldContext_Mutation_setPeriodicScanInterval(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_setPeriodicScanInterval_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_setScannerConcurrentWorkers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_setScannerConcurrentWorkers(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().SetScannerConcurrentWorkers(rctx, fc.Args["workers"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(int); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be int`, 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.(int)
fc.Result = res
return ec.marshalNInt2int(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_setScannerConcurrentWorkers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_setScannerConcurrentWorkers_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
2022-08-05 20:37:55 +02:00
func (ec *executionContext) _Mutation_setThumbnailDownsampleMethod(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_setThumbnailDownsampleMethod(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().SetThumbnailDownsampleMethod(rctx, fc.Args["method"].(models.ThumbnailFilter))
2022-08-05 20:37:55 +02:00
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(models.ThumbnailFilter); ok {
2022-08-05 20:37:55 +02:00
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/photoview/photoview/api/graphql/models.ThumbnailFilter`, tmp)
2022-08-05 20:37:55 +02:00
})
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.(models.ThumbnailFilter)
2022-08-05 20:37:55 +02:00
fc.Result = res
return ec.marshalNThumbnailFilter2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐThumbnailFilter(ctx, field.Selections, res)
2022-08-05 20:37:55 +02:00
}
func (ec *executionContext) fieldContext_Mutation_setThumbnailDownsampleMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ThumbnailFilter does not have child fields")
2022-08-05 20:37:55 +02:00
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_setThumbnailDownsampleMethod_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2022-08-05 20:37:55 +02:00
}
return fc, nil
}
func (ec *executionContext) _Mutation_changeUserPreferences(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_changeUserPreferences(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().ChangeUserPreferences(rctx, fc.Args["language"].(*string))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.UserPreferences); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.UserPreferences`, 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.(*models.UserPreferences)
fc.Result = res
return ec.marshalNUserPreferences2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUserPreferences(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_changeUserPreferences(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_UserPreferences_id(ctx, field)
case "language":
return ec.fieldContext_UserPreferences_language(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type UserPreferences", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_changeUserPreferences_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_resetAlbumCover(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_resetAlbumCover(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().ResetAlbumCover(rctx, fc.Args["albumID"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.Album); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.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.(*models.Album)
fc.Result = res
return ec.marshalNAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_resetAlbumCover(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_resetAlbumCover_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_setAlbumCover(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_setAlbumCover(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().SetAlbumCover(rctx, fc.Args["coverID"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.Album); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.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.(*models.Album)
fc.Result = res
return ec.marshalNAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_setAlbumCover(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-17 13:50:32 +01:00
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
2021-02-17 13:50:32 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
2021-02-17 13:50:32 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_setAlbumCover_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2021-02-17 13:50:32 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_setFaceGroupLabel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_setFaceGroupLabel(ctx, field)
if err != nil {
2021-02-17 13:50:32 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-17 13:50:32 +01:00
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().SetFaceGroupLabel(rctx, fc.Args["faceGroupID"].(int), fc.Args["label"].(*string))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.FaceGroup); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.FaceGroup`, tmp)
2021-02-17 13:50:32 +01:00
})
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.(*models.FaceGroup)
fc.Result = res
return ec.marshalNFaceGroup2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroup(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_setFaceGroupLabel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-17 13:50:32 +01:00
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_FaceGroup_id(ctx, field)
case "label":
return ec.fieldContext_FaceGroup_label(ctx, field)
case "imageFaces":
return ec.fieldContext_FaceGroup_imageFaces(ctx, field)
case "imageFaceCount":
return ec.fieldContext_FaceGroup_imageFaceCount(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type FaceGroup", field.Name)
},
2021-02-17 13:50:32 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
2021-02-17 13:50:32 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_setFaceGroupLabel_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2021-02-17 13:50:32 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_combineFaceGroups(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_combineFaceGroups(ctx, field)
if err != nil {
2021-02-17 13:50:32 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-17 13:50:32 +01:00
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().CombineFaceGroups(rctx, fc.Args["destinationFaceGroupID"].(int), fc.Args["sourceFaceGroupID"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.FaceGroup); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.FaceGroup`, tmp)
2021-02-17 13:50:32 +01:00
})
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.(*models.FaceGroup)
fc.Result = res
return ec.marshalNFaceGroup2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroup(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_combineFaceGroups(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-17 13:50:32 +01:00
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_FaceGroup_id(ctx, field)
case "label":
return ec.fieldContext_FaceGroup_label(ctx, field)
case "imageFaces":
return ec.fieldContext_FaceGroup_imageFaces(ctx, field)
case "imageFaceCount":
return ec.fieldContext_FaceGroup_imageFaceCount(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type FaceGroup", field.Name)
},
2021-02-17 13:50:32 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
2021-02-17 13:50:32 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_combineFaceGroups_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2021-02-17 13:50:32 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_moveImageFaces(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_moveImageFaces(ctx, field)
if err != nil {
2021-02-17 13:50:32 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-17 13:50:32 +01:00
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().MoveImageFaces(rctx, fc.Args["imageFaceIDs"].([]int), fc.Args["destinationFaceGroupID"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.FaceGroup); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.FaceGroup`, tmp)
2021-02-17 13:50:32 +01:00
})
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
}
2021-02-20 14:45:43 +01:00
res := resTmp.(*models.FaceGroup)
2021-02-17 13:50:32 +01:00
fc.Result = res
2021-02-20 14:45:43 +01:00
return ec.marshalNFaceGroup2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroup(ctx, field.Selections, res)
2021-02-17 13:50:32 +01:00
}
func (ec *executionContext) fieldContext_Mutation_moveImageFaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-17 13:50:32 +01:00
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_FaceGroup_id(ctx, field)
case "label":
return ec.fieldContext_FaceGroup_label(ctx, field)
case "imageFaces":
return ec.fieldContext_FaceGroup_imageFaces(ctx, field)
case "imageFaceCount":
return ec.fieldContext_FaceGroup_imageFaceCount(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type FaceGroup", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_moveImageFaces_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2021-02-17 13:50:32 +01:00
}
return fc, nil
}
2021-02-17 13:50:32 +01:00
func (ec *executionContext) _Mutation_recognizeUnlabeledFaces(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_recognizeUnlabeledFaces(ctx, field)
if err != nil {
return graphql.Null
}
2021-02-17 13:50:32 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-17 13:50:32 +01:00
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().RecognizeUnlabeledFaces(rctx)
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.([]*models.ImageFace); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/photoview/photoview/api/graphql/models.ImageFace`, tmp)
2021-02-17 13:50:32 +01:00
})
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.([]*models.ImageFace)
fc.Result = res
return ec.marshalNImageFace2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐImageFaceᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_recognizeUnlabeledFaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-22 18:14:31 +01:00
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ImageFace_id(ctx, field)
case "media":
return ec.fieldContext_ImageFace_media(ctx, field)
case "rectangle":
return ec.fieldContext_ImageFace_rectangle(ctx, field)
case "faceGroup":
return ec.fieldContext_ImageFace_faceGroup(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ImageFace", field.Name)
},
2021-02-22 18:14:31 +01:00
}
return fc, nil
}
2021-02-22 18:14:31 +01:00
func (ec *executionContext) _Mutation_detachImageFaces(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_detachImageFaces(ctx, field)
2021-02-22 18:14:31 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-22 18:14:31 +01:00
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().DetachImageFaces(rctx, fc.Args["imageFaceIDs"].([]int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.FaceGroup); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.FaceGroup`, tmp)
2021-02-22 18:14:31 +01:00
})
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.(*models.FaceGroup)
fc.Result = res
return ec.marshalNFaceGroup2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroup(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_detachImageFaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_FaceGroup_id(ctx, field)
case "label":
return ec.fieldContext_FaceGroup_label(ctx, field)
case "imageFaces":
return ec.fieldContext_FaceGroup_imageFaces(ctx, field)
case "imageFaceCount":
return ec.fieldContext_FaceGroup_imageFaceCount(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type FaceGroup", field.Name)
},
}
2020-02-02 00:29:42 +01:00
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
2020-02-02 00:29:42 +01:00
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Mutation_detachImageFaces_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2020-02-02 00:29:42 +01:00
}
return fc, nil
}
func (ec *executionContext) _Notification_key(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Notification_key(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Key, nil
2020-02-02 00:29:42 +01:00
})
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")
}
2020-02-02 00:29:42 +01:00
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Notification_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Notification",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-02-02 00:29:42 +01:00
}
return fc, nil
}
func (ec *executionContext) _Notification_type(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Notification_type(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Type, nil
2020-02-02 00:29:42 +01:00
})
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")
}
2020-02-02 00:29:42 +01:00
return graphql.Null
}
res := resTmp.(models.NotificationType)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNNotificationType2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐNotificationType(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Notification_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Notification",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type NotificationType does not have child fields")
},
2020-02-02 00:29:42 +01:00
}
return fc, nil
}
func (ec *executionContext) _Notification_header(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Notification_header(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Header, nil
2020-02-02 00:29:42 +01:00
})
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")
}
2020-02-02 00:29:42 +01:00
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Notification_header(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Notification",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-02-02 00:29:42 +01:00
}
return fc, nil
}
func (ec *executionContext) _Notification_content(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Notification_content(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Content, nil
2020-02-02 00:29:42 +01:00
})
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")
}
2020-02-02 00:29:42 +01:00
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Notification_content(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Notification",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-02-02 00:29:42 +01:00
}
return fc, nil
}
func (ec *executionContext) _Notification_progress(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Notification_progress(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-02 00:29:42 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Progress, nil
2020-02-02 00:29:42 +01:00
})
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)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) fieldContext_Notification_progress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Notification",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _Notification_positive(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Notification_positive(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Positive, nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-02-01 14:52:27 +01:00
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Notification_positive(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Notification",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _Notification_negative(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Notification_negative(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Negative, nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-02-01 14:52:27 +01:00
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Notification_negative(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Notification",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _Notification_timeout(ctx context.Context, field graphql.CollectedField, obj *models.Notification) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Notification_timeout(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Timeout, nil
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int)
fc.Result = res
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Notification_timeout(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Notification",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
}
return fc, nil
}
2020-02-05 16:49:51 +01:00
func (ec *executionContext) _Query_siteInfo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_siteInfo(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-05 16:49:51 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().SiteInfo(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-02-05 16:49:51 +01:00
return graphql.Null
}
res := resTmp.(*models.SiteInfo)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNSiteInfo2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSiteInfo(ctx, field.Selections, res)
2020-02-05 16:49:51 +01:00
}
func (ec *executionContext) fieldContext_Query_siteInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "initialSetup":
return ec.fieldContext_SiteInfo_initialSetup(ctx, field)
case "faceDetectionEnabled":
return ec.fieldContext_SiteInfo_faceDetectionEnabled(ctx, field)
case "periodicScanInterval":
return ec.fieldContext_SiteInfo_periodicScanInterval(ctx, field)
case "concurrentWorkers":
return ec.fieldContext_SiteInfo_concurrentWorkers(ctx, field)
2022-08-05 20:37:55 +02:00
case "thumbnailMethod":
return ec.fieldContext_SiteInfo_thumbnailMethod(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type SiteInfo", field.Name)
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_user(ctx, field)
2020-02-09 15:26:59 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
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, fc.Args["order"].(*models.Ordering), fc.Args["paginate"].(*models.Pagination))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.([]*models.User); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/photoview/photoview/api/graphql/models.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.([]*models.User)
fc.Result = res
return ec.marshalNUser2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUserᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_User_id(ctx, field)
case "username":
return ec.fieldContext_User_username(ctx, field)
case "albums":
return ec.fieldContext_User_albums(ctx, field)
case "rootAlbums":
return ec.fieldContext_User_rootAlbums(ctx, field)
case "admin":
return ec.fieldContext_User_admin(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_user_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_myUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_myUser(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().MyUser(rctx)
2020-02-01 14:52:27 +01:00
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
2020-02-01 14:52:27 +01:00
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
2020-02-01 14:52:27 +01:00
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
2020-02-01 14:52:27 +01:00
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.User); ok {
2020-02-01 14:52:27 +01:00
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.User`, tmp)
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-01 14:52:27 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*models.User)
fc.Result = res
return ec.marshalNUser2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Query_myUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_User_id(ctx, field)
case "username":
return ec.fieldContext_User_username(ctx, field)
case "albums":
return ec.fieldContext_User_albums(ctx, field)
case "rootAlbums":
return ec.fieldContext_User_rootAlbums(ctx, field)
case "admin":
return ec.fieldContext_User_admin(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _Query_myUserPreferences(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_myUserPreferences(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
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().MyUserPreferences(rctx)
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.UserPreferences); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.UserPreferences`, tmp)
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-02-01 14:52:27 +01:00
return graphql.Null
}
res := resTmp.(*models.UserPreferences)
fc.Result = res
return ec.marshalNUserPreferences2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUserPreferences(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Query_myUserPreferences(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_UserPreferences_id(ctx, field)
case "language":
return ec.fieldContext_UserPreferences_language(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type UserPreferences", field.Name)
},
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _Query_myAlbums(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_myAlbums(ctx, field)
2020-02-09 15:26:59 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
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().MyAlbums(rctx, fc.Args["order"].(*models.Ordering), fc.Args["paginate"].(*models.Pagination), fc.Args["onlyRoot"].(*bool), fc.Args["showEmpty"].(*bool), fc.Args["onlyWithFavorites"].(*bool))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.([]*models.Album); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/photoview/photoview/api/graphql/models.Album`, tmp)
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-02-01 14:52:27 +01:00
return graphql.Null
}
res := resTmp.([]*models.Album)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Query_myAlbums(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
2020-02-01 14:52:27 +01:00
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_myAlbums_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2020-02-01 14:52:27 +01:00
}
return fc, nil
}
func (ec *executionContext) _Query_album(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_album(ctx, field)
2020-02-01 14:52:27 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Album(rctx, fc.Args["id"].(int), fc.Args["tokenCredentials"].(*models.ShareTokenCredentials))
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 12:53:21 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-02-01 14:52:27 +01:00
return graphql.Null
}
res := resTmp.(*models.Album)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) fieldContext_Query_album(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
2020-02-01 14:52:27 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_album_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2020-02-09 15:26:59 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_myMedia(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_myMedia(ctx, field)
if err != nil {
2020-02-09 15:26:59 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 14:52:27 +01:00
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().MyMedia(rctx, fc.Args["order"].(*models.Ordering), fc.Args["paginate"].(*models.Pagination))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.([]*models.Media); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/photoview/photoview/api/graphql/models.Media`, tmp)
2020-02-01 14:52:27 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 21:25:33 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*models.Media)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMedia2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaᚄ(ctx, field.Selections, res)
2020-02-09 21:25:33 +01:00
}
func (ec *executionContext) fieldContext_Query_myMedia(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
2020-02-09 21:25:33 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_myMedia_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2020-02-09 21:25:33 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_media(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_media(ctx, field)
if err != nil {
2020-02-09 21:25:33 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-09 21:25:33 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Media(rctx, fc.Args["id"].(int), fc.Args["tokenCredentials"].(*models.ShareTokenCredentials))
2020-02-09 21:25:33 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 21:25:33 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*models.Media)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx, field.Selections, res)
2020-02-09 21:25:33 +01:00
}
func (ec *executionContext) fieldContext_Query_media(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_media_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_mediaList(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_mediaList(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().MediaList(rctx, fc.Args["ids"].([]int))
})
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.([]*models.Media)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMedia2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_mediaList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-04 19:02:51 +01:00
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
2021-02-04 19:02:51 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
2021-02-04 19:02:51 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_mediaList_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2021-02-07 17:13:27 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_myTimeline(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_myTimeline(ctx, field)
if err != nil {
2021-02-07 17:13:27 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-04 19:02:51 +01:00
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().MyTimeline(rctx, fc.Args["paginate"].(*models.Pagination), fc.Args["onlyFavorites"].(*bool), fc.Args["fromDate"].(*time.Time))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
2021-09-18 20:17:24 +02:00
if data, ok := tmp.([]*models.Media); ok {
return data, nil
}
2021-09-18 20:17:24 +02:00
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/photoview/photoview/api/graphql/models.Media`, tmp)
2021-02-04 19:02:51 +01:00
})
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
}
2021-09-18 20:17:24 +02:00
res := resTmp.([]*models.Media)
2021-02-04 19:02:51 +01:00
fc.Result = res
2021-09-18 20:17:24 +02:00
return ec.marshalNMedia2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaᚄ(ctx, field.Selections, res)
2021-02-04 19:02:51 +01:00
}
func (ec *executionContext) fieldContext_Query_myTimeline(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_myTimeline_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_myMediaGeoJson(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_myMediaGeoJson(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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().MyMediaGeoJSON(rctx)
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(interface{}); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be interface{}`, 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.(interface{})
fc.Result = res
return ec.marshalNAny2interface(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_myMediaGeoJson(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Any does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Query_mapboxToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_mapboxToken(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().MapboxToken(rctx)
})
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) fieldContext_Query_mapboxToken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-02-09 21:25:33 +01:00
}
return fc, nil
}
func (ec *executionContext) _Query_shareToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_shareToken(ctx, field)
2020-02-09 21:25:33 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-09 21:25:33 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().ShareToken(rctx, fc.Args["credentials"].(models.ShareTokenCredentials))
2020-02-09 21:25:33 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 21:25:33 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
2020-02-11 14:32:35 +01:00
res := resTmp.(*models.ShareToken)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNShareToken2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, field.Selections, res)
2020-02-09 21:25:33 +01:00
}
func (ec *executionContext) fieldContext_Query_shareToken(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_ShareToken_id(ctx, field)
case "token":
return ec.fieldContext_ShareToken_token(ctx, field)
case "owner":
return ec.fieldContext_ShareToken_owner(ctx, field)
case "expire":
return ec.fieldContext_ShareToken_expire(ctx, field)
case "hasPassword":
return ec.fieldContext_ShareToken_hasPassword(ctx, field)
case "album":
return ec.fieldContext_ShareToken_album(ctx, field)
case "media":
return ec.fieldContext_ShareToken_media(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ShareToken", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_shareToken_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_shareTokenValidatePassword(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_shareTokenValidatePassword(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().ShareTokenValidatePassword(rctx, fc.Args["credentials"].(models.ShareTokenCredentials))
})
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) fieldContext_Query_shareTokenValidatePassword(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
2020-03-05 11:53:42 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_shareTokenValidatePassword_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2020-03-05 11:53:42 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_search(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_search(ctx, field)
if err != nil {
2020-03-05 11:53:42 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-03-05 11:53:42 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Search(rctx, fc.Args["query"].(string), fc.Args["limitMedia"].(*int), fc.Args["limitAlbums"].(*int))
2020-03-05 11:53:42 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-03-05 11:53:42 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*models.SearchResult)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNSearchResult2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSearchResult(ctx, field.Selections, res)
2020-03-05 11:53:42 +01:00
}
func (ec *executionContext) fieldContext_Query_search(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-16 12:01:10 +01:00
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "query":
return ec.fieldContext_SearchResult_query(ctx, field)
case "albums":
return ec.fieldContext_SearchResult_albums(ctx, field)
case "media":
return ec.fieldContext_SearchResult_media(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type SearchResult", field.Name)
},
2021-02-16 12:01:10 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
2021-02-16 12:01:10 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_search_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2021-02-16 12:01:10 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_myFaceGroups(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_myFaceGroups(ctx, field)
if err != nil {
2021-02-16 12:01:10 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-16 12:01:10 +01:00
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().MyFaceGroups(rctx, fc.Args["paginate"].(*models.Pagination))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.([]*models.FaceGroup); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/photoview/photoview/api/graphql/models.FaceGroup`, tmp)
2021-02-16 12:01:10 +01:00
})
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.([]*models.FaceGroup)
fc.Result = res
return ec.marshalNFaceGroup2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroupᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_myFaceGroups(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-25 20:39:24 +01:00
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_FaceGroup_id(ctx, field)
case "label":
return ec.fieldContext_FaceGroup_label(ctx, field)
case "imageFaces":
return ec.fieldContext_FaceGroup_imageFaces(ctx, field)
case "imageFaceCount":
return ec.fieldContext_FaceGroup_imageFaceCount(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type FaceGroup", field.Name)
},
2021-02-25 20:39:24 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
2021-02-25 20:39:24 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_myFaceGroups_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2021-02-25 20:39:24 +01:00
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_faceGroup(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_faceGroup(ctx, field)
if err != nil {
2021-02-25 20:39:24 +01:00
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-25 20:39:24 +01:00
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().FaceGroup(rctx, fc.Args["id"].(int))
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAuthorized == nil {
return nil, errors.New("directive isAuthorized is not implemented")
}
return ec.directives.IsAuthorized(ctx, nil, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.(*models.FaceGroup); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/photoview/photoview/api/graphql/models.FaceGroup`, tmp)
2021-02-25 20:39:24 +01:00
})
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.(*models.FaceGroup)
fc.Result = res
return ec.marshalNFaceGroup2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroup(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_faceGroup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_FaceGroup_id(ctx, field)
case "label":
return ec.fieldContext_FaceGroup_label(ctx, field)
case "imageFaces":
return ec.fieldContext_FaceGroup_imageFaces(ctx, field)
case "imageFaceCount":
return ec.fieldContext_FaceGroup_imageFaceCount(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type FaceGroup", field.Name)
},
}
2020-02-09 21:25:33 +01:00
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
2020-02-09 21:25:33 +01:00
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query_faceGroup_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2020-02-09 21:25:33 +01:00
}
return fc, nil
}
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query___type(ctx, field)
2020-02-09 21:25:33 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-09 21:25:33 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.introspectType(fc.Args["name"].(string))
2020-02-09 21:25:33 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
2020-02-09 21:25:33 +01:00
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
2020-02-09 21:25:33 +01:00
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query___schema(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-09 21:25:33 +01:00
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
2020-02-09 21:25:33 +01:00
return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "description":
return ec.fieldContext___Schema_description(ctx, field)
case "types":
return ec.fieldContext___Schema_types(ctx, field)
case "queryType":
return ec.fieldContext___Schema_queryType(ctx, field)
case "mutationType":
return ec.fieldContext___Schema_mutationType(ctx, field)
case "subscriptionType":
return ec.fieldContext___Schema_subscriptionType(ctx, field)
case "directives":
return ec.fieldContext___Schema_directives(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name)
},
}
return fc, nil
}
2020-02-09 21:25:33 +01:00
func (ec *executionContext) _ScannerResult_finished(ctx context.Context, field graphql.CollectedField, obj *models.ScannerResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ScannerResult_finished(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-09 21:25:33 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Finished, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 21:25:33 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
2020-02-09 21:25:33 +01:00
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_ScannerResult_finished(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ScannerResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
2020-02-09 21:25:33 +01:00
}
return fc, nil
}
func (ec *executionContext) _ScannerResult_success(ctx context.Context, field graphql.CollectedField, obj *models.ScannerResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ScannerResult_success(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-09 21:25:33 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Success, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 21:25:33 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
2020-02-09 21:25:33 +01:00
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_ScannerResult_success(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ScannerResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
2020-02-09 21:25:33 +01:00
}
return fc, nil
}
func (ec *executionContext) _ScannerResult_progress(ctx context.Context, field graphql.CollectedField, obj *models.ScannerResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ScannerResult_progress(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-09 21:25:33 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Progress, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
2020-02-01 14:52:27 +01:00
return graphql.Null
}
2020-02-09 21:25:33 +01:00
res := resTmp.(*float64)
fc.Result = res
2020-02-09 21:25:33 +01:00
return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
2020-01-31 23:30:34 +01:00
}
func (ec *executionContext) fieldContext_ScannerResult_progress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ScannerResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2020-01-31 23:30:34 +01:00
}
return fc, nil
}
func (ec *executionContext) _ScannerResult_message(ctx context.Context, field graphql.CollectedField, obj *models.ScannerResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ScannerResult_message(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-31 23:30:34 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-02-09 21:25:33 +01:00
return obj.Message, nil
2020-01-31 23:30:34 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
2020-02-09 21:25:33 +01:00
res := resTmp.(*string)
fc.Result = res
2020-02-09 21:25:33 +01:00
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_ScannerResult_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ScannerResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
2020-03-05 11:53:42 +01:00
func (ec *executionContext) _SearchResult_query(ctx context.Context, field graphql.CollectedField, obj *models.SearchResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SearchResult_query(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-03-05 11:53:42 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Query, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-03-05 11:53:42 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
2020-03-05 11:53:42 +01:00
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SearchResult_query(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SearchResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-03-05 11:53:42 +01:00
}
return fc, nil
}
func (ec *executionContext) _SearchResult_albums(ctx context.Context, field graphql.CollectedField, obj *models.SearchResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SearchResult_albums(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-03-05 11:53:42 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Albums, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-03-05 11:53:42 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*models.Album)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res)
2020-03-05 11:53:42 +01:00
}
func (ec *executionContext) fieldContext_SearchResult_albums(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SearchResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _SearchResult_media(ctx context.Context, field graphql.CollectedField, obj *models.SearchResult) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SearchResult_media(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-03-05 11:53:42 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Media, nil
2020-03-05 11:53:42 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-03-05 11:53:42 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*models.Media)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMedia2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaᚄ(ctx, field.Selections, res)
2020-03-05 11:53:42 +01:00
}
func (ec *executionContext) fieldContext_SearchResult_media(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SearchResult",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
}
return fc, nil
}
2020-02-09 21:25:33 +01:00
func (ec *executionContext) _ShareToken_id(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ShareToken_id(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ID, nil
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 21:25:33 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-01-30 14:28:14 +01:00
return graphql.Null
}
2020-02-09 21:25:33 +01:00
res := resTmp.(int)
fc.Result = res
return ec.marshalNID2int(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_ShareToken_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ShareToken",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ID does not have child fields")
},
}
return fc, nil
}
2020-02-09 21:25:33 +01:00
func (ec *executionContext) _ShareToken_token(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ShareToken_token(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-02-09 21:25:33 +01:00
return obj.Token(), nil
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-09 21:25:33 +01:00
ec.Errorf(ctx, "must not be null")
}
2020-01-30 14:28:14 +01:00
return graphql.Null
}
2020-02-09 21:25:33 +01:00
res := resTmp.(string)
fc.Result = res
2020-02-09 21:25:33 +01:00
return ec.marshalNString2string(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_ShareToken_token(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ShareToken",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
2020-02-09 21:25:33 +01:00
func (ec *executionContext) _ShareToken_owner(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ShareToken_owner(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 17:58:45 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-11-27 16:02:10 +01:00
return obj.Owner, nil
2020-02-01 17:58:45 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-01 17:58:45 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
2020-11-27 16:02:10 +01:00
res := resTmp.(models.User)
fc.Result = res
2020-12-17 23:18:00 +01:00
return ec.marshalNUser2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, field.Selections, res)
2020-02-01 17:58:45 +01:00
}
func (ec *executionContext) fieldContext_ShareToken_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ShareToken",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_User_id(ctx, field)
case "username":
return ec.fieldContext_User_username(ctx, field)
case "albums":
return ec.fieldContext_User_albums(ctx, field)
case "rootAlbums":
return ec.fieldContext_User_rootAlbums(ctx, field)
case "admin":
return ec.fieldContext_User_admin(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
2020-02-01 17:58:45 +01:00
}
return fc, nil
}
func (ec *executionContext) _ShareToken_expire(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ShareToken_expire(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-02-01 17:58:45 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-02-09 21:25:33 +01:00
return obj.Expire, nil
2020-02-01 17:58:45 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
2020-02-09 21:25:33 +01:00
res := resTmp.(*time.Time)
fc.Result = res
2020-02-09 21:25:33 +01:00
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
2020-02-01 17:58:45 +01:00
}
func (ec *executionContext) fieldContext_ShareToken_expire(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ShareToken",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Time does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _ShareToken_hasPassword(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ShareToken_hasPassword(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.ShareToken().HasPassword(rctx, obj)
})
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) fieldContext_ShareToken_hasPassword(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ShareToken",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
2020-02-09 21:25:33 +01:00
func (ec *executionContext) _ShareToken_album(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ShareToken_album(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 17:58:45 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-11-27 16:02:10 +01:00
return obj.Album, nil
2020-02-01 17:58:45 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
2020-12-17 22:29:24 +01:00
res := resTmp.(*models.Album)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalOAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res)
2020-02-01 17:58:45 +01:00
}
func (ec *executionContext) fieldContext_ShareToken_album(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ShareToken",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _ShareToken_media(ctx context.Context, field graphql.CollectedField, obj *models.ShareToken) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ShareToken_media(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-01 17:58:45 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
2020-11-27 16:02:10 +01:00
return obj.Media, nil
2020-02-01 17:58:45 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.Media)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalOMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx, field.Selections, res)
2020-02-01 17:58:45 +01:00
}
func (ec *executionContext) fieldContext_ShareToken_media(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ShareToken",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
}
return fc, nil
}
2020-02-05 16:49:51 +01:00
func (ec *executionContext) _SiteInfo_initialSetup(ctx context.Context, field graphql.CollectedField, obj *models.SiteInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SiteInfo_initialSetup(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-02-05 16:49:51 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.InitialSetup, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-02-05 16:49:51 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
2020-02-05 16:49:51 +01:00
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SiteInfo_initialSetup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SiteInfo",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _SiteInfo_faceDetectionEnabled(ctx context.Context, field graphql.CollectedField, obj *models.SiteInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SiteInfo_faceDetectionEnabled(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SiteInfo().FaceDetectionEnabled(rctx, obj)
})
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) fieldContext_SiteInfo_faceDetectionEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SiteInfo",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _SiteInfo_periodicScanInterval(ctx context.Context, field graphql.CollectedField, obj *models.SiteInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SiteInfo_periodicScanInterval(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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.PeriodicScanInterval, nil
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(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.(int); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be int`, 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.(int)
fc.Result = res
return ec.marshalNInt2int(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SiteInfo_periodicScanInterval(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SiteInfo",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _SiteInfo_concurrentWorkers(ctx context.Context, field graphql.CollectedField, obj *models.SiteInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SiteInfo_concurrentWorkers(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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.ConcurrentWorkers, nil
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(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.(int); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be int`, 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.(int)
fc.Result = res
return ec.marshalNInt2int(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SiteInfo_concurrentWorkers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SiteInfo",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
}
return fc, nil
}
2022-08-05 20:37:55 +02:00
func (ec *executionContext) _SiteInfo_thumbnailMethod(ctx context.Context, field graphql.CollectedField, obj *models.SiteInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SiteInfo_thumbnailMethod(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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.ThumbnailMethod, nil
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(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.(models.ThumbnailFilter); ok {
2022-08-05 20:37:55 +02:00
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/photoview/photoview/api/graphql/models.ThumbnailFilter`, tmp)
2022-08-05 20:37:55 +02:00
})
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.(models.ThumbnailFilter)
2022-08-05 20:37:55 +02:00
fc.Result = res
return ec.marshalNThumbnailFilter2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐThumbnailFilter(ctx, field.Selections, res)
2022-08-05 20:37:55 +02:00
}
func (ec *executionContext) fieldContext_SiteInfo_thumbnailMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SiteInfo",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ThumbnailFilter does not have child fields")
2022-08-05 20:37:55 +02:00
},
}
return fc, nil
}
func (ec *executionContext) _Subscription_notification(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
fc, err := ec.fieldContext_Subscription_notification(ctx, field)
if err != nil {
return nil
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Subscription().Notification(rctx)
})
if err != nil {
ec.Error(ctx, err)
return nil
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return nil
}
return func(ctx context.Context) graphql.Marshaler {
select {
case res, ok := <-resTmp.(<-chan *models.Notification):
if !ok {
return nil
}
return graphql.WriterFunc(func(w io.Writer) {
w.Write([]byte{'{'})
graphql.MarshalString(field.Alias).MarshalGQL(w)
w.Write([]byte{':'})
ec.marshalNNotification2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐNotification(ctx, field.Selections, res).MarshalGQL(w)
w.Write([]byte{'}'})
})
case <-ctx.Done():
return nil
}
}
}
func (ec *executionContext) fieldContext_Subscription_notification(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Subscription",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "key":
return ec.fieldContext_Notification_key(ctx, field)
case "type":
return ec.fieldContext_Notification_type(ctx, field)
case "header":
return ec.fieldContext_Notification_header(ctx, field)
case "content":
return ec.fieldContext_Notification_content(ctx, field)
case "progress":
return ec.fieldContext_Notification_progress(ctx, field)
case "positive":
return ec.fieldContext_Notification_positive(ctx, field)
case "negative":
return ec.fieldContext_Notification_negative(ctx, field)
case "timeout":
return ec.fieldContext_Notification_timeout(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Notification", field.Name)
},
}
return fc, nil
}
2021-02-04 19:02:51 +01:00
func (ec *executionContext) _TimelineGroup_album(ctx context.Context, field graphql.CollectedField, obj *models.TimelineGroup) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TimelineGroup_album(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-02-04 19:02:51 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Album, 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.(*models.Album)
fc.Result = res
return ec.marshalNAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TimelineGroup_album(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TimelineGroup",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
return fc, nil
}
2021-02-04 19:02:51 +01:00
func (ec *executionContext) _TimelineGroup_media(ctx context.Context, field graphql.CollectedField, obj *models.TimelineGroup) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TimelineGroup_media(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-02-04 19:02:51 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Media, 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.([]*models.Media)
fc.Result = res
return ec.marshalNMedia2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TimelineGroup_media(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TimelineGroup",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
}
return fc, nil
}
2021-02-04 19:02:51 +01:00
func (ec *executionContext) _TimelineGroup_mediaTotal(ctx context.Context, field graphql.CollectedField, obj *models.TimelineGroup) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TimelineGroup_mediaTotal(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2021-02-04 19:02:51 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MediaTotal, 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) fieldContext_TimelineGroup_mediaTotal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2021-02-04 19:02:51 +01:00
Object: "TimelineGroup",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
2021-02-04 19:02:51 +01:00
}
return fc, nil
}
2021-02-04 19:02:51 +01:00
func (ec *executionContext) _TimelineGroup_date(ctx context.Context, field graphql.CollectedField, obj *models.TimelineGroup) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TimelineGroup_date(ctx, field)
if err != nil {
return graphql.Null
}
2021-02-04 19:02:51 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2021-02-04 19:02:51 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Date, 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.(time.Time)
fc.Result = res
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TimelineGroup_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TimelineGroup",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Time does not have child fields")
},
}
return fc, nil
}
2020-01-31 23:30:34 +01:00
func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_id(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ID, nil
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
2020-02-09 21:25:33 +01:00
res := resTmp.(int)
fc.Result = res
return ec.marshalNID2int(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "User",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ID does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) _User_username(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_username(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Username, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_username(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "User",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _User_albums(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_albums(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2020-01-31 23:30:34 +01:00
directive0 := func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.User().Albums(rctx, obj)
2020-01-31 23:30:34 +01:00
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(ctx, obj, directive0)
}
tmp, err := directive1(rctx)
if err != nil {
return nil, graphql.ErrorOnPath(ctx, err)
2020-01-31 23:30:34 +01:00
}
if tmp == nil {
return nil, nil
}
if data, ok := tmp.([]*models.Album); ok {
2020-01-31 23:30:34 +01:00
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/photoview/photoview/api/graphql/models.Album`, tmp)
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*models.Album)
fc.Result = res
return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_albums(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "User",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_rootAlbums(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_rootAlbums(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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.User().RootAlbums(rctx, obj)
}
directive1 := func(ctx context.Context) (interface{}, error) {
if ec.directives.IsAdmin == nil {
return nil, errors.New("directive isAdmin is not implemented")
}
return ec.directives.IsAdmin(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.([]*models.Album); ok {
return data, nil
}
return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/photoview/photoview/api/graphql/models.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.([]*models.Album)
fc.Result = res
return ec.marshalNAlbum2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext_User_rootAlbums(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "User",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Album_id(ctx, field)
case "title":
return ec.fieldContext_Album_title(ctx, field)
case "media":
return ec.fieldContext_Album_media(ctx, field)
case "subAlbums":
return ec.fieldContext_Album_subAlbums(ctx, field)
case "parentAlbum":
return ec.fieldContext_Album_parentAlbum(ctx, field)
case "owner":
return ec.fieldContext_Album_owner(ctx, field)
case "filePath":
return ec.fieldContext_Album_filePath(ctx, field)
case "thumbnail":
return ec.fieldContext_Album_thumbnail(ctx, field)
case "path":
return ec.fieldContext_Album_path(ctx, field)
case "shares":
return ec.fieldContext_Album_shares(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Album", field.Name)
},
}
return fc, nil
}
2020-01-31 23:30:34 +01:00
func (ec *executionContext) _User_admin(ctx context.Context, field graphql.CollectedField, obj *models.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_admin(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Admin, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_admin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "User",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _UserPreferences_id(ctx context.Context, field graphql.CollectedField, obj *models.UserPreferences) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserPreferences_id(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ID, 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.marshalNID2int(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserPreferences_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserPreferences",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ID does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _UserPreferences_language(ctx context.Context, field graphql.CollectedField, obj *models.UserPreferences) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserPreferences_language(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Language, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*models.LanguageTranslation)
fc.Result = res
return ec.marshalOLanguageTranslation2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐLanguageTranslation(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserPreferences_language(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserPreferences",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type LanguageTranslation does not have child fields")
},
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_id(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_id(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-07-12 14:17:49 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ID, nil
2020-07-12 14:17:49 +02:00
})
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.marshalNID2int(ctx, field.Selections, res)
2020-07-12 14:17:49 +02:00
}
func (ec *executionContext) fieldContext_VideoMetadata_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ID does not have child fields")
},
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_media(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_media(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-07-12 14:17:49 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Media(), nil
2020-07-12 14:17:49 +02:00
})
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.(*models.Media)
fc.Result = res
2020-12-17 22:51:43 +01:00
return ec.marshalNMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx, field.Selections, res)
2020-07-12 14:17:49 +02:00
}
func (ec *executionContext) fieldContext_VideoMetadata_media(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "id":
return ec.fieldContext_Media_id(ctx, field)
case "title":
return ec.fieldContext_Media_title(ctx, field)
case "path":
return ec.fieldContext_Media_path(ctx, field)
case "thumbnail":
return ec.fieldContext_Media_thumbnail(ctx, field)
case "highRes":
return ec.fieldContext_Media_highRes(ctx, field)
case "videoWeb":
return ec.fieldContext_Media_videoWeb(ctx, field)
case "album":
return ec.fieldContext_Media_album(ctx, field)
case "exif":
return ec.fieldContext_Media_exif(ctx, field)
case "videoMetadata":
return ec.fieldContext_Media_videoMetadata(ctx, field)
case "favorite":
return ec.fieldContext_Media_favorite(ctx, field)
case "type":
return ec.fieldContext_Media_type(ctx, field)
case "date":
return ec.fieldContext_Media_date(ctx, field)
case "blurhash":
return ec.fieldContext_Media_blurhash(ctx, field)
case "shares":
return ec.fieldContext_Media_shares(ctx, field)
case "downloads":
return ec.fieldContext_Media_downloads(ctx, field)
case "faces":
return ec.fieldContext_Media_faces(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Media", field.Name)
},
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_width(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_width(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-07-12 14:17:49 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Width, 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) fieldContext_VideoMetadata_width(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
2020-07-12 14:17:49 +02:00
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_height(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_height(ctx, field)
if err != nil {
return graphql.Null
}
2020-07-12 14:17:49 +02:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-07-12 14:17:49 +02:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Height, 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) fieldContext_VideoMetadata_height(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
},
2020-07-12 14:17:49 +02:00
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_duration(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_duration(ctx, field)
if err != nil {
return graphql.Null
}
2020-07-12 14:17:49 +02:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-07-12 14:17:49 +02:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Duration, 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.(float64)
fc.Result = res
return ec.marshalNFloat2float64(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_VideoMetadata_duration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2020-07-12 14:17:49 +02:00
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_codec(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_codec(ctx, field)
if err != nil {
return graphql.Null
}
2020-07-12 14:17:49 +02:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-07-12 14:17:49 +02:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Codec, 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) fieldContext_VideoMetadata_codec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-07-12 14:17:49 +02:00
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_framerate(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_framerate(ctx, field)
if err != nil {
return graphql.Null
}
2020-07-12 14:17:49 +02:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-07-12 14:17:49 +02:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Framerate, nil
})
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) fieldContext_VideoMetadata_framerate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Float does not have child fields")
},
2020-07-12 14:17:49 +02:00
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_bitrate(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_bitrate(ctx, field)
if err != nil {
return graphql.Null
}
2020-07-12 14:17:49 +02:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-07-12 14:17:49 +02:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bitrate, nil
2020-07-12 14:17:49 +02:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*string)
2020-07-12 14:17:49 +02:00
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2020-07-12 14:17:49 +02:00
}
func (ec *executionContext) fieldContext_VideoMetadata_bitrate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-07-12 14:17:49 +02:00
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_colorProfile(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_colorProfile(ctx, field)
2020-07-12 14:17:49 +02:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ColorProfile, nil
})
if err != nil {
ec.Error(ctx, err)
2020-07-12 14:17:49 +02:00
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) fieldContext_VideoMetadata_colorProfile(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-07-12 14:17:49 +02:00
}
return fc, nil
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) _VideoMetadata_audio(ctx context.Context, field graphql.CollectedField, obj *models.VideoMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_VideoMetadata_audio(ctx, field)
if err != nil {
return graphql.Null
}
2020-07-12 14:17:49 +02:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-07-12 14:17:49 +02:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Audio, 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) fieldContext_VideoMetadata_audio(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "VideoMetadata",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_name(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Directive",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_description(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description(), nil
2020-01-30 14:28:14 +01:00
})
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) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Directive",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_locations(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]string)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Directive",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type __DirectiveLocation does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_args(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]introspection.InputValue)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
2022-02-01 23:39:19 +01:00
Object: "__Directive",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "name":
return ec.fieldContext___InputValue_name(ctx, field)
case "description":
return ec.fieldContext___InputValue_description(ctx, field)
case "type":
return ec.fieldContext___InputValue_type(ctx, field)
case "defaultValue":
return ec.fieldContext___InputValue_defaultValue(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
},
2022-02-01 23:39:19 +01:00
}
return fc, nil
}
2022-02-01 23:39:19 +01:00
func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field)
if err != nil {
return graphql.Null
}
2022-02-01 23:39:19 +01:00
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2022-02-01 23:39:19 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsRepeatable, 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) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Directive",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___EnumValue_name(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__EnumValue",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___EnumValue_description(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description(), nil
2020-01-30 14:28:14 +01:00
})
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)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__EnumValue",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__EnumValue",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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
2020-01-30 14:28:14 +01:00
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__EnumValue",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_name(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Field",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_description(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description(), nil
2020-01-30 14:28:14 +01:00
})
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)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Field",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_args(ctx, field)
2022-02-01 23:39:19 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]introspection.InputValue)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Field",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "name":
return ec.fieldContext___InputValue_name(ctx, field)
case "description":
return ec.fieldContext___InputValue_description(ctx, field)
case "type":
return ec.fieldContext___InputValue_type(ctx, field)
case "defaultValue":
return ec.fieldContext___InputValue_defaultValue(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_type(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Field",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Field",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Boolean does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_deprecationReason(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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
2020-01-30 14:28:14 +01:00
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Field",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_name(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__InputValue",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_description(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description(), nil
2020-01-30 14:28:14 +01:00
})
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) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__InputValue",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_type(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__InputValue",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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
2020-01-30 14:28:14 +01:00
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__InputValue",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_description(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Schema",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_types(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]introspection.Type)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Schema",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_queryType(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Schema",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_mutationType(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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
2020-01-30 14:28:14 +01:00
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Schema",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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
2020-01-30 14:28:14 +01:00
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Schema",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_directives(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]introspection.Directive)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Schema",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "name":
return ec.fieldContext___Directive_name(ctx, field)
case "description":
return ec.fieldContext___Directive_description(ctx, field)
case "locations":
return ec.fieldContext___Directive_locations(ctx, field)
case "args":
return ec.fieldContext___Directive_args(ctx, field)
case "isRepeatable":
return ec.fieldContext___Directive_isRepeatable(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name)
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_kind(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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) {
2020-01-30 14:28:14 +01:00
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type __TypeKind does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_name(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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
2020-01-30 14:28:14 +01:00
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_description(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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.marshalOString2ᚖstring(ctx, field.Selections, res)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_fields(ctx, field)
2020-01-30 14:28:14 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]introspection.Field)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "name":
return ec.fieldContext___Field_name(ctx, field)
case "description":
return ec.fieldContext___Field_description(ctx, field)
case "args":
return ec.fieldContext___Field_args(ctx, field)
case "type":
return ec.fieldContext___Field_type(ctx, field)
case "isDeprecated":
return ec.fieldContext___Field_isDeprecated(ctx, field)
case "deprecationReason":
return ec.fieldContext___Field_deprecationReason(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_interfaces(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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
2020-01-30 14:28:14 +01:00
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_possibleTypes(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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
2020-01-30 14:28:14 +01:00
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_enumValues(ctx, field)
2020-01-30 14:28:14 +01:00
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil
2020-01-30 14:28:14 +01:00
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]introspection.EnumValue)
fc.Result = res
2020-01-30 14:28:14 +01:00
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "name":
return ec.fieldContext___EnumValue_name(ctx, field)
case "description":
return ec.fieldContext___EnumValue_description(ctx, field)
case "isDeprecated":
return ec.fieldContext___EnumValue_isDeprecated(ctx, field)
case "deprecationReason":
return ec.fieldContext___EnumValue_deprecationReason(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name)
},
}
defer func() {
if r := recover(); r != nil {
err = ec.Recover(ctx, r)
ec.Error(ctx, err)
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
2020-01-30 14:28:14 +01:00
}
return fc, nil
}
func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_inputFields(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
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
2020-01-30 14:28:14 +01:00
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "name":
return ec.fieldContext___InputValue_name(ctx, field)
case "description":
return ec.fieldContext___InputValue_description(ctx, field)
case "type":
return ec.fieldContext___InputValue_type(ctx, field)
case "defaultValue":
return ec.fieldContext___InputValue_defaultValue(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
},
}
return fc, nil
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_ofType(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
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)
}
func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "kind":
return ec.fieldContext___Type_kind(ctx, field)
case "name":
return ec.fieldContext___Type_name(ctx, field)
case "description":
return ec.fieldContext___Type_description(ctx, field)
case "fields":
return ec.fieldContext___Type_fields(ctx, field)
case "interfaces":
return ec.fieldContext___Type_interfaces(ctx, field)
case "possibleTypes":
return ec.fieldContext___Type_possibleTypes(ctx, field)
case "enumValues":
return ec.fieldContext___Type_enumValues(ctx, field)
case "inputFields":
return ec.fieldContext___Type_inputFields(ctx, field)
case "ofType":
return ec.fieldContext___Type_ofType(ctx, field)
case "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field)
if err != nil {
return graphql.Null
2020-01-30 14:28:14 +01:00
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
2020-01-30 14:28:14 +01:00
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.SpecifiedByURL(), nil
2020-01-30 14:28:14 +01:00
})
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) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
IsMethod: true,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
2020-01-30 14:28:14 +01:00
}
// endregion **************************** field.gotpl *****************************
// region **************************** input.gotpl *****************************
func (ec *executionContext) unmarshalInputOrdering(ctx context.Context, obj interface{}) (models.Ordering, error) {
var it models.Ordering
2022-02-01 23:39:19 +01:00
asMap := map[string]interface{}{}
for k, v := range obj.(map[string]interface{}) {
asMap[k] = v
}
2020-02-09 15:26:59 +01:00
fieldsInOrder := [...]string{"order_by", "order_direction"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
2020-02-09 15:26:59 +01:00
switch k {
case "order_by":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order_by"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
2020-02-09 15:26:59 +01:00
if err != nil {
return it, err
}
it.OrderBy = data
2020-02-09 15:26:59 +01:00
case "order_direction":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order_direction"))
data, err := ec.unmarshalOOrderDirection2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐOrderDirection(ctx, v)
2020-02-09 15:26:59 +01:00
if err != nil {
return it, err
}
it.OrderDirection = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputPagination(ctx context.Context, obj interface{}) (models.Pagination, error) {
var it models.Pagination
2022-02-01 23:39:19 +01:00
asMap := map[string]interface{}{}
for k, v := range obj.(map[string]interface{}) {
asMap[k] = v
}
fieldsInOrder := [...]string{"limit", "offset"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
2020-02-09 15:26:59 +01:00
case "limit":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
data, err := ec.unmarshalOInt2ᚖint(ctx, v)
2020-02-09 15:26:59 +01:00
if err != nil {
return it, err
}
it.Limit = data
2020-02-09 15:26:59 +01:00
case "offset":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("offset"))
data, err := ec.unmarshalOInt2ᚖint(ctx, v)
2020-02-09 15:26:59 +01:00
if err != nil {
return it, err
}
it.Offset = data
2020-02-09 15:26:59 +01:00
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputShareTokenCredentials(ctx context.Context, obj interface{}) (models.ShareTokenCredentials, error) {
var it models.ShareTokenCredentials
2022-02-01 23:39:19 +01:00
asMap := map[string]interface{}{}
for k, v := range obj.(map[string]interface{}) {
asMap[k] = v
}
fieldsInOrder := [...]string{"token", "password"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "token":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("token"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Token = data
case "password":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.Password = data
}
}
return it, nil
}
2020-01-30 14:28:14 +01:00
// endregion **************************** input.gotpl *****************************
// region ************************** interface.gotpl ***************************
// endregion ************************** interface.gotpl ***************************
// region **************************** object.gotpl ****************************
2020-02-01 14:52:27 +01:00
var albumImplementors = []string{"Album"}
func (ec *executionContext) _Album(ctx context.Context, sel ast.SelectionSet, obj *models.Album) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, albumImplementors)
2020-02-01 14:52:27 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-02-01 14:52:27 +01:00
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 {
atomic.AddUint32(&out.Invalids, 1)
}
2020-11-27 16:02:10 +01:00
case "title":
out.Values[i] = ec._Album_title(ctx, field, obj)
2020-11-27 16:02:10 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2020-11-27 16:02:10 +01:00
}
case "media":
2020-02-05 16:14:21 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-05 16:14:21 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
2020-11-27 16:02:10 +01:00
res = ec._Album_media(ctx, field, obj)
2020-02-09 12:53:21 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-02-05 16:14:21 +01:00
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2020-11-27 16:02:10 +01:00
case "subAlbums":
2020-02-05 16:14:21 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-05 16:14:21 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
2020-11-27 16:02:10 +01:00
res = ec._Album_subAlbums(ctx, field, obj)
2020-02-05 16:14:21 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-05 16:14:21 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
2022-02-01 23:39:19 +01:00
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "parentAlbum":
out.Values[i] = ec._Album_parentAlbum(ctx, field, obj)
2020-11-27 16:02:10 +01:00
case "owner":
2020-12-22 01:14:43 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-12-22 01:14:43 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Album_owner(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-12-22 01:14:43 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
2022-02-01 23:39:19 +01:00
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "filePath":
out.Values[i] = ec._Album_filePath(ctx, field, obj)
2020-02-09 12:53:21 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-02-09 16:16:41 +01:00
case "thumbnail":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-09 16:16:41 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Album_thumbnail(ctx, field, obj)
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2020-03-07 16:19:27 +01:00
case "path":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-03-07 16:19:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Album_path(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-03-07 16:19:27 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "shares":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Album_shares(ctx, field, obj)
2021-04-17 22:14:17 +02:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-04-17 22:14:17 +02:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2020-01-30 14:28:14 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-01-30 14:28:14 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-01-30 14:28:14 +01:00
return out
}
var authorizeResultImplementors = []string{"AuthorizeResult"}
func (ec *executionContext) _AuthorizeResult(ctx context.Context, sel ast.SelectionSet, obj *models.AuthorizeResult) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, authorizeResultImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("AuthorizeResult")
case "success":
out.Values[i] = ec._AuthorizeResult_success(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "status":
out.Values[i] = ec._AuthorizeResult_status(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "token":
out.Values[i] = ec._AuthorizeResult_token(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
return out
}
var coordinatesImplementors = []string{"Coordinates"}
func (ec *executionContext) _Coordinates(ctx context.Context, sel ast.SelectionSet, obj *models.Coordinates) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, coordinatesImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Coordinates")
case "latitude":
out.Values[i] = ec._Coordinates_latitude(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "longitude":
out.Values[i] = ec._Coordinates_longitude(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
return out
}
2021-02-16 12:01:10 +01:00
var faceGroupImplementors = []string{"FaceGroup"}
func (ec *executionContext) _FaceGroup(ctx context.Context, sel ast.SelectionSet, obj *models.FaceGroup) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, faceGroupImplementors)
2021-02-16 12:01:10 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2021-02-16 12:01:10 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("FaceGroup")
case "id":
out.Values[i] = ec._FaceGroup_id(ctx, field, obj)
2021-02-16 12:01:10 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2021-02-16 12:01:10 +01:00
}
case "label":
out.Values[i] = ec._FaceGroup_label(ctx, field, obj)
2021-02-16 12:01:10 +01:00
case "imageFaces":
2021-02-25 18:48:59 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-02-25 18:48:59 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._FaceGroup_imageFaces(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-02-25 18:48:59 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2021-02-25 18:48:59 +01:00
case "imageFaceCount":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-02-25 18:48:59 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._FaceGroup_imageFaceCount(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-02-25 18:48:59 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2021-02-16 12:01:10 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2021-02-16 12:01:10 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2021-02-16 12:01:10 +01:00
return out
}
var faceRectangleImplementors = []string{"FaceRectangle"}
func (ec *executionContext) _FaceRectangle(ctx context.Context, sel ast.SelectionSet, obj *models.FaceRectangle) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, faceRectangleImplementors)
2021-02-16 12:01:10 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2021-02-16 12:01:10 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("FaceRectangle")
case "minX":
out.Values[i] = ec._FaceRectangle_minX(ctx, field, obj)
2021-02-16 12:01:10 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-16 12:01:10 +01:00
}
case "maxX":
out.Values[i] = ec._FaceRectangle_maxX(ctx, field, obj)
2021-02-16 12:01:10 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-16 12:01:10 +01:00
}
case "minY":
out.Values[i] = ec._FaceRectangle_minY(ctx, field, obj)
2021-02-16 12:01:10 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-16 12:01:10 +01:00
}
case "maxY":
out.Values[i] = ec._FaceRectangle_maxY(ctx, field, obj)
2021-02-16 12:01:10 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-16 12:01:10 +01:00
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2021-02-16 12:01:10 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2021-02-16 12:01:10 +01:00
return out
}
var imageFaceImplementors = []string{"ImageFace"}
func (ec *executionContext) _ImageFace(ctx context.Context, sel ast.SelectionSet, obj *models.ImageFace) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, imageFaceImplementors)
2021-02-16 12:01:10 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2021-02-16 12:01:10 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("ImageFace")
case "id":
out.Values[i] = ec._ImageFace_id(ctx, field, obj)
2021-02-16 12:01:10 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2021-02-16 12:01:10 +01:00
}
case "media":
2021-10-19 23:28:23 +02:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-10-19 23:28:23 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._ImageFace_media(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-10-19 23:28:23 +02:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
2022-02-01 23:39:19 +01:00
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "rectangle":
out.Values[i] = ec._ImageFace_rectangle(ctx, field, obj)
2021-04-17 22:40:46 +02:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2021-04-17 22:40:46 +02:00
}
2021-02-19 23:30:43 +01:00
case "faceGroup":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-02-19 23:30:43 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._ImageFace_faceGroup(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-02-19 23:30:43 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2021-02-16 12:01:10 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2021-02-16 12:01:10 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2021-02-16 12:01:10 +01:00
return out
}
var mediaImplementors = []string{"Media"}
2020-02-01 14:52:27 +01:00
func (ec *executionContext) _Media(ctx context.Context, sel ast.SelectionSet, obj *models.Media) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, mediaImplementors)
2020-02-01 14:52:27 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-02-01 14:52:27 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Media")
2020-02-01 14:52:27 +01:00
case "id":
out.Values[i] = ec._Media_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
}
2020-02-01 14:52:27 +01:00
case "title":
out.Values[i] = ec._Media_title(ctx, field, obj)
2020-02-09 12:53:21 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-02-01 14:52:27 +01:00
case "path":
out.Values[i] = ec._Media_path(ctx, field, obj)
2020-02-09 12:53:21 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-02-10 12:05:58 +01:00
case "thumbnail":
2020-02-05 14:51:46 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-05 14:51:46 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_thumbnail(ctx, field, obj)
2020-02-05 14:51:46 +01:00
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2020-02-10 12:05:58 +01:00
case "highRes":
2020-02-05 14:51:46 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-05 14:51:46 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_highRes(ctx, field, obj)
2020-02-09 12:53:21 +01:00
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2020-07-11 15:57:58 +02:00
case "videoWeb":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-07-11 15:57:58 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_videoWeb(ctx, field, obj)
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2020-02-10 12:05:58 +01:00
case "album":
2021-09-18 20:17:24 +02:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-09-18 20:17:24 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_album(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-09-18 20:17:24 +02:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2020-02-10 12:05:58 +01:00
case "exif":
2021-01-19 16:46:15 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-01-19 16:46:15 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_exif(ctx, field, obj)
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
2022-02-01 23:39:19 +01:00
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "videoMetadata":
out.Values[i] = ec._Media_videoMetadata(ctx, field, obj)
2020-06-17 18:00:58 +02:00
case "favorite":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_favorite(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "type":
2021-04-27 20:31:15 +02:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-04-27 20:31:15 +02:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_type(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-04-27 20:31:15 +02:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
2022-02-01 23:39:19 +01:00
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "date":
out.Values[i] = ec._Media_date(ctx, field, obj)
2021-09-18 20:17:24 +02:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2021-09-18 20:17:24 +02:00
}
2022-02-01 23:39:19 +01:00
case "blurhash":
out.Values[i] = ec._Media_blurhash(ctx, field, obj)
2020-02-10 12:05:58 +01:00
case "shares":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-10 12:05:58 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_shares(ctx, field, obj)
2020-02-05 14:51:46 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-05 14:51:46 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2020-02-10 12:05:58 +01:00
case "downloads":
2020-02-05 14:51:46 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-05 14:51:46 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_downloads(ctx, field, obj)
2020-02-10 12:05:58 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-10 12:05:58 +01:00
}
2020-02-05 14:51:46 +01:00
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2021-02-16 17:13:08 +01:00
case "faces":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-02-16 17:13:08 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Media_faces(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-02-16 17:13:08 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2020-02-02 00:29:42 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-02-02 00:29:42 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-02-02 00:29:42 +01:00
return out
}
var mediaDownloadImplementors = []string{"MediaDownload"}
2020-02-10 12:05:58 +01:00
func (ec *executionContext) _MediaDownload(ctx context.Context, sel ast.SelectionSet, obj *models.MediaDownload) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, mediaDownloadImplementors)
2020-02-10 12:05:58 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-02-10 12:05:58 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("MediaDownload")
2020-02-10 12:05:58 +01:00
case "title":
out.Values[i] = ec._MediaDownload_title(ctx, field, obj)
2020-02-10 12:05:58 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-02-10 12:05:58 +01:00
}
case "mediaUrl":
out.Values[i] = ec._MediaDownload_mediaUrl(ctx, field, obj)
2020-02-10 12:05:58 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-02-10 12:05:58 +01:00
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-02-10 12:05:58 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-02-10 12:05:58 +01:00
return out
}
var mediaEXIFImplementors = []string{"MediaEXIF"}
2020-02-02 00:29:42 +01:00
func (ec *executionContext) _MediaEXIF(ctx context.Context, sel ast.SelectionSet, obj *models.MediaEXIF) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, mediaEXIFImplementors)
2020-02-02 00:29:42 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-02-02 00:29:42 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("MediaEXIF")
2020-02-24 23:30:08 +01:00
case "id":
out.Values[i] = ec._MediaEXIF_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "media":
out.Values[i] = ec._MediaEXIF_media(ctx, field, obj)
2022-02-01 23:39:19 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
}
2022-03-28 17:08:30 +02:00
case "description":
out.Values[i] = ec._MediaEXIF_description(ctx, field, obj)
2020-02-02 00:29:42 +01:00
case "camera":
out.Values[i] = ec._MediaEXIF_camera(ctx, field, obj)
2020-02-02 00:29:42 +01:00
case "maker":
out.Values[i] = ec._MediaEXIF_maker(ctx, field, obj)
2020-02-02 00:29:42 +01:00
case "lens":
out.Values[i] = ec._MediaEXIF_lens(ctx, field, obj)
2020-02-02 00:29:42 +01:00
case "dateShot":
out.Values[i] = ec._MediaEXIF_dateShot(ctx, field, obj)
2020-02-02 00:29:42 +01:00
case "exposure":
out.Values[i] = ec._MediaEXIF_exposure(ctx, field, obj)
2020-02-02 00:29:42 +01:00
case "aperture":
out.Values[i] = ec._MediaEXIF_aperture(ctx, field, obj)
2020-02-02 00:29:42 +01:00
case "iso":
out.Values[i] = ec._MediaEXIF_iso(ctx, field, obj)
2020-02-02 00:29:42 +01:00
case "focalLength":
out.Values[i] = ec._MediaEXIF_focalLength(ctx, field, obj)
2020-02-02 00:29:42 +01:00
case "flash":
out.Values[i] = ec._MediaEXIF_flash(ctx, field, obj)
2020-02-24 23:30:08 +01:00
case "exposureProgram":
out.Values[i] = ec._MediaEXIF_exposureProgram(ctx, field, obj)
case "coordinates":
out.Values[i] = ec._MediaEXIF_coordinates(ctx, field, obj)
2020-02-01 14:52:27 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-02-01 14:52:27 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-02-01 14:52:27 +01:00
return out
}
var mediaURLImplementors = []string{"MediaURL"}
2020-02-01 14:52:27 +01:00
func (ec *executionContext) _MediaURL(ctx context.Context, sel ast.SelectionSet, obj *models.MediaURL) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, mediaURLImplementors)
2020-02-01 14:52:27 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-02-01 14:52:27 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("MediaURL")
2020-02-01 14:52:27 +01:00
case "url":
out.Values[i] = ec._MediaURL_url(ctx, field, obj)
2020-02-09 12:53:21 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-02-09 12:53:21 +01:00
}
2020-02-01 14:52:27 +01:00
case "width":
out.Values[i] = ec._MediaURL_width(ctx, field, obj)
2020-02-09 12:53:21 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-02-09 12:53:21 +01:00
}
2020-02-01 14:52:27 +01:00
case "height":
out.Values[i] = ec._MediaURL_height(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "fileSize":
out.Values[i] = ec._MediaURL_fileSize(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
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)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
2022-02-01 23:39:19 +01:00
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
Object: field.Name,
Field: field,
})
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Mutation")
case "authorizeUser":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_authorizeUser(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "initialSetupWizard":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_initialSetupWizard(ctx, field)
})
case "scanAll":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_scanAll(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "scanUser":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_scanUser(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "shareAlbum":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_shareAlbum(ctx, field)
})
2021-04-13 19:57:33 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-04-13 19:57:33 +02:00
}
case "shareMedia":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_shareMedia(ctx, field)
})
2021-04-13 19:57:33 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-04-13 19:57:33 +02:00
}
case "deleteShareToken":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteShareToken(ctx, field)
})
2021-04-13 19:57:33 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-04-13 19:57:33 +02:00
}
case "protectShareToken":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_protectShareToken(ctx, field)
})
2021-04-13 19:57:33 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-04-13 19:57:33 +02:00
}
case "favoriteMedia":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_favoriteMedia(ctx, field)
})
2021-04-13 19:57:33 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-04-13 19:57:33 +02:00
}
case "updateUser":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_updateUser(ctx, field)
})
2021-04-13 19:57:33 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-04-13 19:57:33 +02:00
}
case "createUser":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_createUser(ctx, field)
})
2021-04-13 19:57:33 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-04-13 19:57:33 +02:00
}
case "deleteUser":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteUser(ctx, field)
})
2021-04-13 19:57:33 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-04-13 19:57:33 +02:00
}
case "userAddRootPath":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_userAddRootPath(ctx, field)
})
case "userRemoveRootAlbum":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_userRemoveRootAlbum(ctx, field)
})
2020-09-21 11:50:39 +02:00
case "setPeriodicScanInterval":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_setPeriodicScanInterval(ctx, field)
})
2020-09-21 11:50:39 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-09-21 11:50:39 +02:00
}
case "setScannerConcurrentWorkers":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_setScannerConcurrentWorkers(ctx, field)
})
2022-08-05 20:37:55 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2022-08-05 20:37:55 +02:00
}
case "setThumbnailDownsampleMethod":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_setThumbnailDownsampleMethod(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "changeUserPreferences":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_changeUserPreferences(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "resetAlbumCover":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_resetAlbumCover(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "setAlbumCover":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_setAlbumCover(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
2021-02-17 13:50:32 +01:00
case "setFaceGroupLabel":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_setFaceGroupLabel(ctx, field)
})
2021-02-17 13:50:32 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-17 13:50:32 +01:00
}
case "combineFaceGroups":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_combineFaceGroups(ctx, field)
})
2021-02-17 13:50:32 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-17 13:50:32 +01:00
}
2021-02-20 14:45:43 +01:00
case "moveImageFaces":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_moveImageFaces(ctx, field)
})
2021-02-17 13:50:32 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-17 13:50:32 +01:00
}
case "recognizeUnlabeledFaces":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_recognizeUnlabeledFaces(ctx, field)
})
2021-02-17 13:50:32 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-17 13:50:32 +01:00
}
2021-02-22 18:14:31 +01:00
case "detachImageFaces":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_detachImageFaces(ctx, field)
})
2021-02-22 18:14:31 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-22 18:14:31 +01:00
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
return out
}
var notificationImplementors = []string{"Notification"}
func (ec *executionContext) _Notification(ctx context.Context, sel ast.SelectionSet, obj *models.Notification) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, notificationImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Notification")
case "key":
out.Values[i] = ec._Notification_key(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "type":
out.Values[i] = ec._Notification_type(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "header":
out.Values[i] = ec._Notification_header(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "content":
out.Values[i] = ec._Notification_content(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "progress":
out.Values[i] = ec._Notification_progress(ctx, field, obj)
case "positive":
out.Values[i] = ec._Notification_positive(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "negative":
out.Values[i] = ec._Notification_negative(ctx, field, obj)
2020-02-09 12:53:21 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-02-09 12:53:21 +01:00
}
case "timeout":
out.Values[i] = ec._Notification_timeout(ctx, field, obj)
2020-02-01 14:52:27 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-02-01 14:52:27 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-02-01 14:52:27 +01:00
return out
}
2020-01-30 14:28:14 +01:00
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{
2020-01-30 14:28:14 +01:00
Object: "Query",
})
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-01-30 14:28:14 +01:00
for i, field := range fields {
2022-02-01 23:39:19 +01:00
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
Object: field.Name,
Field: field,
})
2020-01-30 14:28:14 +01:00
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Query")
2020-02-05 16:49:51 +01:00
case "siteInfo":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-05 16:49:51 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_siteInfo(ctx, field)
2020-02-09 12:53:21 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-02-05 16:49:51 +01:00
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2020-02-15 22:13:02 +01:00
case "user":
2020-01-30 14:28:14 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-01-30 14:28:14 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
2020-02-15 22:13:02 +01:00
res = ec._Query_user(ctx, field)
2020-01-30 14:28:14 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-01-30 14:28:14 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2020-01-31 23:30:34 +01:00
case "myUser":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-01-31 23:30:34 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_myUser(ctx, field)
2020-02-09 12:53:21 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-01-31 23:30:34 +01:00
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "myUserPreferences":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_myUserPreferences(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2020-02-01 14:52:27 +01:00
case "myAlbums":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_myAlbums(ctx, field)
2020-02-09 12:53:21 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-02-01 14:52:27 +01:00
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2020-02-01 14:52:27 +01:00
case "album":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_album(ctx, field)
2020-02-09 12:53:21 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-02-01 14:52:27 +01:00
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "myMedia":
2020-02-01 14:52:27 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_myMedia(ctx, field)
2020-02-09 12:53:21 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-02-01 14:52:27 +01:00
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "media":
2020-02-01 14:52:27 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-01 14:52:27 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_media(ctx, field)
2020-02-09 12:53:21 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-09 12:53:21 +01:00
}
2020-02-01 14:52:27 +01:00
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "mediaList":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_mediaList(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2021-02-04 19:02:51 +01:00
case "myTimeline":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-02-04 19:02:51 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_myTimeline(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-02-04 19:02:51 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "myMediaGeoJson":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_myMediaGeoJson(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "mapboxToken":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_mapboxToken(ctx, field)
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2020-02-11 14:32:35 +01:00
case "shareToken":
2020-02-09 21:25:33 +01:00
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-02-09 21:25:33 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
2020-02-11 14:32:35 +01:00
res = ec._Query_shareToken(ctx, field)
2020-02-09 21:25:33 +01:00
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-02-09 21:25:33 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2020-06-14 20:56:48 +02:00
case "shareTokenValidatePassword":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
2020-06-14 20:56:48 +02:00
res = ec._Query_shareTokenValidatePassword(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2020-03-05 11:53:42 +01:00
case "search":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2020-03-05 11:53:42 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_search(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2020-03-05 11:53:42 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2021-02-16 12:01:10 +01:00
case "myFaceGroups":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-02-16 12:01:10 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_myFaceGroups(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-02-25 20:39:24 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2021-02-25 20:39:24 +01:00
case "faceGroup":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2021-02-25 20:39:24 +01:00
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_faceGroup(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
2021-02-16 12:01:10 +01:00
}
return res
2022-02-01 23:39:19 +01:00
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2022-02-01 23:39:19 +01:00
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
2020-01-30 14:28:14 +01:00
case "__type":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Query___type(ctx, field)
})
2020-01-30 14:28:14 +01:00
case "__schema":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Query___schema(ctx, field)
})
2020-01-30 14:28:14 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-01-30 14:28:14 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-01-30 14:28:14 +01:00
return out
}
2020-02-01 17:58:45 +01:00
var scannerResultImplementors = []string{"ScannerResult"}
func (ec *executionContext) _ScannerResult(ctx context.Context, sel ast.SelectionSet, obj *models.ScannerResult) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, scannerResultImplementors)
2020-02-01 17:58:45 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-02-01 17:58:45 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("ScannerResult")
case "finished":
out.Values[i] = ec._ScannerResult_finished(ctx, field, obj)
2020-02-01 17:58:45 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-02-01 17:58:45 +01:00
}
case "success":
out.Values[i] = ec._ScannerResult_success(ctx, field, obj)
2020-02-01 17:58:45 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-02-01 17:58:45 +01:00
}
case "progress":
out.Values[i] = ec._ScannerResult_progress(ctx, field, obj)
2020-02-01 17:58:45 +01:00
case "message":
out.Values[i] = ec._ScannerResult_message(ctx, field, obj)
2020-02-01 17:58:45 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-02-01 17:58:45 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-02-01 17:58:45 +01:00
return out
}
2020-03-05 11:53:42 +01:00
var searchResultImplementors = []string{"SearchResult"}
func (ec *executionContext) _SearchResult(ctx context.Context, sel ast.SelectionSet, obj *models.SearchResult) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, searchResultImplementors)
2020-03-05 11:53:42 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-03-05 11:53:42 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("SearchResult")
case "query":
out.Values[i] = ec._SearchResult_query(ctx, field, obj)
2020-03-05 11:53:42 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-03-05 11:53:42 +01:00
}
case "albums":
out.Values[i] = ec._SearchResult_albums(ctx, field, obj)
2020-03-05 11:53:42 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-03-05 11:53:42 +01:00
}
case "media":
out.Values[i] = ec._SearchResult_media(ctx, field, obj)
2020-03-05 11:53:42 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-03-05 11:53:42 +01:00
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-03-05 11:53:42 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-03-05 11:53:42 +01:00
return out
}
2020-02-09 21:25:33 +01:00
var shareTokenImplementors = []string{"ShareToken"}
func (ec *executionContext) _ShareToken(ctx context.Context, sel ast.SelectionSet, obj *models.ShareToken) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, shareTokenImplementors)
2020-02-09 21:25:33 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-02-09 21:25:33 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("ShareToken")
case "id":
out.Values[i] = ec._ShareToken_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
}
2020-11-27 16:02:10 +01:00
case "token":
out.Values[i] = ec._ShareToken_token(ctx, field, obj)
2020-11-27 16:02:10 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2020-11-27 16:02:10 +01:00
}
case "owner":
out.Values[i] = ec._ShareToken_owner(ctx, field, obj)
2020-11-27 16:02:10 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2020-11-27 16:02:10 +01:00
}
2020-02-09 21:25:33 +01:00
case "expire":
out.Values[i] = ec._ShareToken_expire(ctx, field, obj)
case "hasPassword":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._ShareToken_hasPassword(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
2022-02-01 23:39:19 +01:00
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "album":
out.Values[i] = ec._ShareToken_album(ctx, field, obj)
case "media":
out.Values[i] = ec._ShareToken_media(ctx, field, obj)
2020-02-09 21:25:33 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-02-09 21:25:33 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-02-09 21:25:33 +01:00
return out
}
2020-02-05 16:49:51 +01:00
var siteInfoImplementors = []string{"SiteInfo"}
func (ec *executionContext) _SiteInfo(ctx context.Context, sel ast.SelectionSet, obj *models.SiteInfo) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, siteInfoImplementors)
2020-02-05 16:49:51 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-02-05 16:49:51 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("SiteInfo")
case "initialSetup":
out.Values[i] = ec._SiteInfo_initialSetup(ctx, field, obj)
2020-02-05 16:49:51 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2020-02-05 16:49:51 +01:00
}
case "faceDetectionEnabled":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._SiteInfo_faceDetectionEnabled(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
2022-02-01 23:39:19 +01:00
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "periodicScanInterval":
out.Values[i] = ec._SiteInfo_periodicScanInterval(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
}
case "concurrentWorkers":
out.Values[i] = ec._SiteInfo_concurrentWorkers(ctx, field, obj)
2022-08-05 20:37:55 +02:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2022-08-05 20:37:55 +02:00
}
case "thumbnailMethod":
out.Values[i] = ec._SiteInfo_thumbnailMethod(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
}
2020-02-05 16:49:51 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-02-05 16:49:51 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-02-05 16:49:51 +01:00
return out
}
var subscriptionImplementors = []string{"Subscription"}
func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Subscription",
})
if len(fields) != 1 {
ec.Errorf(ctx, "must subscribe to exactly one stream")
return nil
}
switch fields[0].Name {
case "notification":
return ec._Subscription_notification(ctx, fields[0])
default:
panic("unknown field " + strconv.Quote(fields[0].Name))
}
}
2021-02-04 19:02:51 +01:00
var timelineGroupImplementors = []string{"TimelineGroup"}
func (ec *executionContext) _TimelineGroup(ctx context.Context, sel ast.SelectionSet, obj *models.TimelineGroup) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, timelineGroupImplementors)
2021-02-04 19:02:51 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2021-02-04 19:02:51 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("TimelineGroup")
case "album":
out.Values[i] = ec._TimelineGroup_album(ctx, field, obj)
2021-02-04 19:02:51 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-04 19:02:51 +01:00
}
case "media":
out.Values[i] = ec._TimelineGroup_media(ctx, field, obj)
2021-02-04 19:02:51 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-04 19:02:51 +01:00
}
case "mediaTotal":
out.Values[i] = ec._TimelineGroup_mediaTotal(ctx, field, obj)
2021-02-04 19:02:51 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-04 19:02:51 +01:00
}
case "date":
out.Values[i] = ec._TimelineGroup_date(ctx, field, obj)
2021-02-04 19:02:51 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2021-02-04 19:02:51 +01:00
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2021-02-04 19:02:51 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2021-02-04 19:02:51 +01:00
return out
}
2020-01-30 14:28:14 +01:00
var userImplementors = []string{"User"}
2020-01-31 23:30:34 +01:00
func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *models.User) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
2020-01-30 14:28:14 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-01-30 14:28:14 +01:00
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 {
atomic.AddUint32(&out.Invalids, 1)
}
2020-01-30 14:28:14 +01:00
case "username":
out.Values[i] = ec._User_username(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2020-01-30 14:28:14 +01:00
}
case "albums":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._User_albums(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "rootAlbums":
field := field
2022-02-01 23:39:19 +01:00
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._User_rootAlbums(ctx, field, obj)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
2022-02-01 23:39:19 +01:00
}
if field.Deferrable != nil {
dfs, ok := deferred[field.Deferrable.Label]
di := 0
if ok {
dfs.AddField(field)
di = len(dfs.Values) - 1
} else {
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
deferred[field.Deferrable.Label] = dfs
}
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
return innerFunc(ctx, dfs)
})
2022-02-01 23:39:19 +01:00
// don't run the out.Concurrently() call below
out.Values[i] = graphql.Null
continue
}
2022-02-01 23:39:19 +01:00
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "admin":
out.Values[i] = ec._User_admin(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
2020-01-30 14:28:14 +01:00
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-01-30 14:28:14 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-01-30 14:28:14 +01:00
return out
}
var userPreferencesImplementors = []string{"UserPreferences"}
func (ec *executionContext) _UserPreferences(ctx context.Context, sel ast.SelectionSet, obj *models.UserPreferences) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, userPreferencesImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("UserPreferences")
case "id":
out.Values[i] = ec._UserPreferences_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._UserPreferences_language(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
return out
}
2020-07-12 14:17:49 +02:00
var videoMetadataImplementors = []string{"VideoMetadata"}
func (ec *executionContext) _VideoMetadata(ctx context.Context, sel ast.SelectionSet, obj *models.VideoMetadata) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, videoMetadataImplementors)
2020-07-12 14:17:49 +02:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-07-12 14:17:49 +02:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("VideoMetadata")
case "id":
out.Values[i] = ec._VideoMetadata_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
2020-07-12 14:17:49 +02:00
case "media":
out.Values[i] = ec._VideoMetadata_media(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
2020-07-12 14:17:49 +02:00
case "width":
out.Values[i] = ec._VideoMetadata_width(ctx, field, obj)
2020-07-12 14:17:49 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-07-12 14:17:49 +02:00
}
case "height":
out.Values[i] = ec._VideoMetadata_height(ctx, field, obj)
2020-07-12 14:17:49 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-07-12 14:17:49 +02:00
}
case "duration":
out.Values[i] = ec._VideoMetadata_duration(ctx, field, obj)
2020-07-12 14:17:49 +02:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-07-12 14:17:49 +02:00
}
case "codec":
out.Values[i] = ec._VideoMetadata_codec(ctx, field, obj)
2020-07-12 14:17:49 +02:00
case "framerate":
out.Values[i] = ec._VideoMetadata_framerate(ctx, field, obj)
2020-07-12 14:17:49 +02:00
case "bitrate":
out.Values[i] = ec._VideoMetadata_bitrate(ctx, field, obj)
2020-07-12 14:17:49 +02:00
case "colorProfile":
out.Values[i] = ec._VideoMetadata_colorProfile(ctx, field, obj)
2020-07-12 14:17:49 +02:00
case "audio":
out.Values[i] = ec._VideoMetadata_audio(ctx, field, obj)
2020-07-12 14:17:49 +02:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-07-12 14:17:49 +02:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-07-12 14:17:49 +02:00
return out
}
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "description":
out.Values[i] = ec.___Directive_description(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "locations":
out.Values[i] = ec.___Directive_locations(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "args":
out.Values[i] = ec.___Directive_args(ctx, field, obj)
2022-02-01 23:39:19 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2022-02-01 23:39:19 +01:00
}
case "isRepeatable":
out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-01-30 14:28:14 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "description":
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "isDeprecated":
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "deprecationReason":
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
2020-01-30 14:28:14 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-01-30 14:28:14 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "description":
out.Values[i] = ec.___Field_description(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "args":
out.Values[i] = ec.___Field_args(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "type":
out.Values[i] = ec.___Field_type(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "isDeprecated":
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "deprecationReason":
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
2020-01-30 14:28:14 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-01-30 14:28:14 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "description":
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "type":
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "defaultValue":
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
2020-01-30 14:28:14 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-01-30 14:28:14 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-01-30 14:28:14 +01:00
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("__Schema")
case "description":
out.Values[i] = ec.___Schema_description(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "types":
out.Values[i] = ec.___Schema_types(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "queryType":
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "mutationType":
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "subscriptionType":
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "directives":
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-01-30 14:28:14 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
if out.Values[i] == graphql.Null {
out.Invalids++
2020-01-30 14:28:14 +01:00
}
case "name":
out.Values[i] = ec.___Type_name(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "description":
out.Values[i] = ec.___Type_description(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "fields":
out.Values[i] = ec.___Type_fields(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "interfaces":
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "possibleTypes":
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "enumValues":
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "inputFields":
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
2020-01-30 14:28:14 +01:00
case "ofType":
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
case "specifiedByURL":
out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj)
2020-01-30 14:28:14 +01:00
default:
panic("unknown field " + strconv.Quote(field.Name))
}
}
out.Dispatch(ctx)
if out.Invalids > 0 {
2020-01-30 14:28:14 +01:00
return graphql.Null
}
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
for label, dfs := range deferred {
ec.processDeferredGroup(graphql.DeferredGroup{
Label: label,
Path: graphql.GetPath(ctx),
FieldSet: dfs,
Context: ctx,
})
}
2020-01-30 14:28:14 +01:00
return out
}
// endregion **************************** object.gotpl ****************************
// region ***************************** type.gotpl *****************************
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNAlbum2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx context.Context, sel ast.SelectionSet, v models.Album) graphql.Marshaler {
2020-02-01 14:52:27 +01:00
return ec._Album(ctx, sel, &v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNAlbum2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbumᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Album) graphql.Marshaler {
2020-02-09 12:53:21 +01:00
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{
2020-02-09 12:53:21 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-02-09 12:53:21 +01:00
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()
}
2020-12-17 22:51:43 +01:00
ret[i] = ec.marshalNAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx, sel, v[i])
2020-02-09 12:53:21 +01:00
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-02-09 12:53:21 +01:00
return ret
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx context.Context, sel ast.SelectionSet, v *models.Album) graphql.Marshaler {
2020-02-01 14:52:27 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-02-01 14:52:27 +01:00
}
return graphql.Null
}
return ec._Album(ctx, sel, v)
}
func (ec *executionContext) unmarshalNAny2interface(ctx context.Context, v interface{}) (interface{}, error) {
res, err := graphql.UnmarshalAny(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNAny2interface(ctx context.Context, sel ast.SelectionSet, v interface{}) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
res := graphql.MarshalAny(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNAuthorizeResult2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAuthorizeResult(ctx context.Context, sel ast.SelectionSet, v models.AuthorizeResult) graphql.Marshaler {
2020-01-30 14:28:14 +01:00
return ec._AuthorizeResult(ctx, sel, &v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNAuthorizeResult2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAuthorizeResult(ctx context.Context, sel ast.SelectionSet, v *models.AuthorizeResult) graphql.Marshaler {
2020-01-30 14:28:14 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-01-30 14:28:14 +01:00
}
return graphql.Null
}
return ec._AuthorizeResult(ctx, sel, v)
}
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
res, err := graphql.UnmarshalBoolean(v)
return res, graphql.ErrorOnPath(ctx, err)
2020-01-30 14:28:14 +01:00
}
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, "the requested element is null which the schema does not allow")
2020-01-30 14:28:14 +01:00
}
}
return res
}
2021-02-17 13:50:32 +01:00
func (ec *executionContext) marshalNFaceGroup2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroup(ctx context.Context, sel ast.SelectionSet, v models.FaceGroup) graphql.Marshaler {
return ec._FaceGroup(ctx, sel, &v)
}
2021-02-16 12:01:10 +01:00
func (ec *executionContext) marshalNFaceGroup2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroupᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.FaceGroup) 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.marshalNFaceGroup2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroup(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2021-02-16 12:01:10 +01:00
return ret
}
func (ec *executionContext) marshalNFaceGroup2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceGroup(ctx context.Context, sel ast.SelectionSet, v *models.FaceGroup) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2021-02-16 12:01:10 +01:00
}
return graphql.Null
}
return ec._FaceGroup(ctx, sel, v)
}
2021-04-17 22:40:46 +02:00
func (ec *executionContext) marshalNFaceRectangle2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐFaceRectangle(ctx context.Context, sel ast.SelectionSet, v models.FaceRectangle) graphql.Marshaler {
return ec._FaceRectangle(ctx, sel, &v)
}
2020-07-12 14:17:49 +02:00
func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) {
2022-02-01 23:39:19 +01:00
res, err := graphql.UnmarshalFloatContext(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
2020-07-12 14:17:49 +02:00
}
func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler {
2022-02-01 23:39:19 +01:00
res := graphql.MarshalFloatContext(v)
2020-07-12 14:17:49 +02:00
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-07-12 14:17:49 +02:00
}
}
2022-02-01 23:39:19 +01:00
return graphql.WrapContextMarshaler(ctx, res)
2020-07-12 14:17:49 +02:00
}
func (ec *executionContext) unmarshalNID2int(ctx context.Context, v interface{}) (int, error) {
res, err := graphql.UnmarshalIntID(v)
return res, graphql.ErrorOnPath(ctx, err)
2020-02-09 12:53:21 +01:00
}
func (ec *executionContext) marshalNID2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
res := graphql.MarshalIntID(v)
2020-11-27 16:02:10 +01:00
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-11-27 16:02:10 +01:00
}
}
return res
}
func (ec *executionContext) unmarshalNID2ᚕintᚄ(ctx context.Context, v interface{}) ([]int, error) {
var vSlice []interface{}
if v != nil {
2022-02-01 23:39:19 +01:00
vSlice = graphql.CoerceList(v)
}
var err error
res := make([]int, len(vSlice))
for i := range vSlice {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
res[i], err = ec.unmarshalNID2int(ctx, vSlice[i])
if err != nil {
return nil, err
}
}
return res, nil
}
func (ec *executionContext) marshalNID2ᚕintᚄ(ctx context.Context, sel ast.SelectionSet, v []int) graphql.Marshaler {
ret := make(graphql.Array, len(v))
for i := range v {
ret[i] = ec.marshalNID2int(ctx, sel, v[i])
}
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
2021-02-16 17:13:08 +01:00
func (ec *executionContext) marshalNImageFace2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐImageFaceᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.ImageFace) 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.marshalNImageFace2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐImageFace(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2021-02-16 17:13:08 +01:00
return ret
}
func (ec *executionContext) marshalNImageFace2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐImageFace(ctx context.Context, sel ast.SelectionSet, v *models.ImageFace) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2021-02-16 17:13:08 +01:00
}
return graphql.Null
}
return ec._ImageFace(ctx, sel, v)
}
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, "the requested element is null which the schema does not allow")
}
}
return res
}
func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface{}) (int64, error) {
res, err := graphql.UnmarshalInt64(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler {
res := graphql.MarshalInt64(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNMedia2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx context.Context, sel ast.SelectionSet, v models.Media) graphql.Marshaler {
return ec._Media(ctx, sel, &v)
2020-02-09 12:53:21 +01:00
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNMedia2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Media) graphql.Marshaler {
2020-02-09 12:53:21 +01:00
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{
2020-02-09 12:53:21 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-02-09 12:53:21 +01:00
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()
}
2020-12-17 22:51:43 +01:00
ret[i] = ec.marshalNMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx, sel, v[i])
2020-02-09 12:53:21 +01:00
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-02-09 12:53:21 +01:00
return ret
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx context.Context, sel ast.SelectionSet, v *models.Media) graphql.Marshaler {
2020-02-09 12:53:21 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-02-09 12:53:21 +01:00
}
return graphql.Null
}
return ec._Media(ctx, sel, v)
2020-02-09 12:53:21 +01:00
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNMediaDownload2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaDownloadᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.MediaDownload) graphql.Marshaler {
2020-02-10 12:05:58 +01:00
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{
2020-02-10 12:05:58 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-02-10 12:05:58 +01:00
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()
}
2020-12-17 22:51:43 +01:00
ret[i] = ec.marshalNMediaDownload2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaDownload(ctx, sel, v[i])
2020-02-10 12:05:58 +01:00
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-02-10 12:05:58 +01:00
return ret
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNMediaDownload2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaDownload(ctx context.Context, sel ast.SelectionSet, v *models.MediaDownload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
return ec._MediaDownload(ctx, sel, v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) unmarshalNMediaType2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaType(ctx context.Context, v interface{}) (models.MediaType, error) {
tmp, err := graphql.UnmarshalString(v)
res := models.MediaType(tmp)
return res, graphql.ErrorOnPath(ctx, err)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNMediaType2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaType(ctx context.Context, sel ast.SelectionSet, v models.MediaType) graphql.Marshaler {
res := graphql.MarshalString(string(v))
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNMediaURL2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaURL(ctx context.Context, sel ast.SelectionSet, v *models.MediaURL) graphql.Marshaler {
2020-02-10 12:05:58 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-02-10 12:05:58 +01:00
}
return graphql.Null
}
return ec._MediaURL(ctx, sel, v)
2020-02-10 12:05:58 +01:00
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNNotification2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐNotification(ctx context.Context, sel ast.SelectionSet, v models.Notification) graphql.Marshaler {
return ec._Notification(ctx, sel, &v)
2020-02-09 12:53:21 +01:00
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNNotification2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐNotification(ctx context.Context, sel ast.SelectionSet, v *models.Notification) graphql.Marshaler {
2020-02-09 12:53:21 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-02-09 12:53:21 +01:00
}
return graphql.Null
}
return ec._Notification(ctx, sel, v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) unmarshalNNotificationType2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐNotificationType(ctx context.Context, v interface{}) (models.NotificationType, error) {
var res models.NotificationType
err := res.UnmarshalGQL(v)
return res, graphql.ErrorOnPath(ctx, err)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNNotificationType2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐNotificationType(ctx context.Context, sel ast.SelectionSet, v models.NotificationType) graphql.Marshaler {
return v
2020-02-09 12:53:21 +01:00
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNScannerResult2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐScannerResult(ctx context.Context, sel ast.SelectionSet, v models.ScannerResult) graphql.Marshaler {
2020-02-01 17:58:45 +01:00
return ec._ScannerResult(ctx, sel, &v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNScannerResult2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐScannerResult(ctx context.Context, sel ast.SelectionSet, v *models.ScannerResult) graphql.Marshaler {
2020-02-01 17:58:45 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-02-01 17:58:45 +01:00
}
return graphql.Null
}
return ec._ScannerResult(ctx, sel, v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNSearchResult2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSearchResult(ctx context.Context, sel ast.SelectionSet, v models.SearchResult) graphql.Marshaler {
2020-03-05 11:53:42 +01:00
return ec._SearchResult(ctx, sel, &v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNSearchResult2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSearchResult(ctx context.Context, sel ast.SelectionSet, v *models.SearchResult) graphql.Marshaler {
2020-03-05 11:53:42 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-03-05 11:53:42 +01:00
}
return graphql.Null
}
return ec._SearchResult(ctx, sel, v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNShareToken2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx context.Context, sel ast.SelectionSet, v models.ShareToken) graphql.Marshaler {
2020-02-09 21:25:33 +01:00
return ec._ShareToken(ctx, sel, &v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNShareToken2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.ShareToken) graphql.Marshaler {
2020-02-09 21:25:33 +01:00
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{
2020-02-09 21:25:33 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-02-09 21:25:33 +01:00
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()
}
2020-12-17 22:51:43 +01:00
ret[i] = ec.marshalNShareToken2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx, sel, v[i])
2020-02-09 21:25:33 +01:00
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-02-09 21:25:33 +01:00
return ret
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNShareToken2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareToken(ctx context.Context, sel ast.SelectionSet, v *models.ShareToken) graphql.Marshaler {
2020-02-09 21:25:33 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-02-09 21:25:33 +01:00
}
return graphql.Null
}
return ec._ShareToken(ctx, sel, v)
}
func (ec *executionContext) unmarshalNShareTokenCredentials2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenCredentials(ctx context.Context, v interface{}) (models.ShareTokenCredentials, error) {
res, err := ec.unmarshalInputShareTokenCredentials(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNSiteInfo2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSiteInfo(ctx context.Context, sel ast.SelectionSet, v models.SiteInfo) graphql.Marshaler {
2020-02-09 12:53:21 +01:00
return ec._SiteInfo(ctx, sel, &v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNSiteInfo2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐSiteInfo(ctx context.Context, sel ast.SelectionSet, v *models.SiteInfo) graphql.Marshaler {
2020-02-09 12:53:21 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-02-09 12:53:21 +01:00
}
return graphql.Null
}
return ec._SiteInfo(ctx, sel, v)
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
res, err := graphql.UnmarshalString(v)
return res, graphql.ErrorOnPath(ctx, err)
2020-01-30 14:28:14 +01:00
}
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, "the requested element is null which the schema does not allow")
2020-01-30 14:28:14 +01:00
}
}
return res
}
func (ec *executionContext) unmarshalNThumbnailFilter2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐThumbnailFilter(ctx context.Context, v interface{}) (models.ThumbnailFilter, error) {
var res models.ThumbnailFilter
err := res.UnmarshalGQL(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNThumbnailFilter2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐThumbnailFilter(ctx context.Context, sel ast.SelectionSet, v models.ThumbnailFilter) graphql.Marshaler {
return v
}
2021-02-04 19:02:51 +01:00
func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
res, err := graphql.UnmarshalTime(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
res := graphql.MarshalTime(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2021-02-04 19:02:51 +01:00
}
}
return res
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNUser2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx context.Context, sel ast.SelectionSet, v models.User) graphql.Marshaler {
2020-01-30 14:28:14 +01:00
return ec._User(ctx, sel, &v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.User) graphql.Marshaler {
2020-01-30 14:28:14 +01:00
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{
2020-01-30 14:28:14 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
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()
}
2020-12-17 22:51:43 +01:00
ret[i] = ec.marshalNUser2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx, sel, v[i])
2020-01-30 14:28:14 +01:00
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-01-30 14:28:14 +01:00
return ret
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUser(ctx context.Context, sel ast.SelectionSet, v *models.User) graphql.Marshaler {
2020-01-30 14:28:14 +01:00
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2020-01-30 14:28:14 +01:00
}
return graphql.Null
}
return ec._User(ctx, sel, v)
}
func (ec *executionContext) marshalNUserPreferences2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUserPreferences(ctx context.Context, sel ast.SelectionSet, v models.UserPreferences) graphql.Marshaler {
return ec._UserPreferences(ctx, sel, &v)
}
func (ec *executionContext) marshalNUserPreferences2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐUserPreferences(ctx context.Context, sel ast.SelectionSet, v *models.UserPreferences) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
return ec._UserPreferences(ctx, sel, v)
}
2020-01-30 14:28:14 +01:00
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{
2020-01-30 14:28:14 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
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()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
}
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, "the requested element is null which the schema does not allow")
2020-01-30 14:28:14 +01:00
}
}
return res
}
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
var vSlice []interface{}
if v != nil {
2022-02-01 23:39:19 +01:00
vSlice = graphql.CoerceList(v)
2020-01-30 14:28:14 +01:00
}
var err error
res := make([]string, len(vSlice))
for i := range vSlice {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
2020-01-30 14:28:14 +01:00
res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
if err != nil {
return nil, err
2020-01-30 14:28:14 +01:00
}
}
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{
2020-01-30 14:28:14 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
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()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-01-30 14:28:14 +01:00
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{
2020-01-30 14:28:14 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
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()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-01-30 14:28:14 +01:00
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{
2020-01-30 14:28:14 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
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()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-01-30 14:28:14 +01:00
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, "the requested element is null which the schema does not allow")
2020-01-30 14:28:14 +01:00
}
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)
2020-01-30 14:28:14 +01:00
}
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, "the requested element is null which the schema does not allow")
2020-01-30 14:28:14 +01:00
}
}
return res
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalOAlbum2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAlbum(ctx context.Context, sel ast.SelectionSet, v *models.Album) graphql.Marshaler {
2020-02-01 14:52:27 +01:00
if v == nil {
return graphql.Null
}
return ec._Album(ctx, sel, v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalOAuthorizeResult2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐAuthorizeResult(ctx context.Context, sel ast.SelectionSet, v *models.AuthorizeResult) graphql.Marshaler {
2020-02-05 16:49:51 +01:00
if v == nil {
return graphql.Null
}
return ec._AuthorizeResult(ctx, sel, v)
}
2020-01-30 14:28:14 +01:00
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
res, err := graphql.UnmarshalBoolean(v)
return res, graphql.ErrorOnPath(ctx, err)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
2022-02-01 23:39:19 +01:00
res := graphql.MarshalBoolean(v)
return res
2020-01-30 14:28:14 +01:00
}
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)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
if v == nil {
return graphql.Null
}
2022-02-01 23:39:19 +01:00
res := graphql.MarshalBoolean(*v)
return res
2020-02-09 15:26:59 +01:00
}
func (ec *executionContext) marshalOCoordinates2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐCoordinates(ctx context.Context, sel ast.SelectionSet, v *models.Coordinates) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Coordinates(ctx, sel, v)
}
2020-02-01 17:58:45 +01:00
func (ec *executionContext) unmarshalOFloat2ᚖfloat64(ctx context.Context, v interface{}) (*float64, error) {
if v == nil {
return nil, nil
}
2022-02-01 23:39:19 +01:00
res, err := graphql.UnmarshalFloatContext(ctx, v)
return &res, graphql.ErrorOnPath(ctx, err)
2020-02-01 17:58:45 +01:00
}
func (ec *executionContext) marshalOFloat2ᚖfloat64(ctx context.Context, sel ast.SelectionSet, v *float64) graphql.Marshaler {
if v == nil {
return graphql.Null
}
2022-02-01 23:39:19 +01:00
res := graphql.MarshalFloatContext(*v)
return graphql.WrapContextMarshaler(ctx, res)
2020-02-01 14:52:27 +01:00
}
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)
2020-02-01 14:52:27 +01:00
}
func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
if v == nil {
return graphql.Null
}
2022-02-01 23:39:19 +01:00
res := graphql.MarshalInt(*v)
return res
2020-02-09 15:26:59 +01:00
}
func (ec *executionContext) unmarshalOInt2ᚖint64(ctx context.Context, v interface{}) (*int64, error) {
if v == nil {
return nil, nil
}
res, err := graphql.UnmarshalInt64(v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOInt2ᚖint64(ctx context.Context, sel ast.SelectionSet, v *int64) graphql.Marshaler {
if v == nil {
return graphql.Null
}
2022-02-01 23:39:19 +01:00
res := graphql.MarshalInt64(*v)
return res
}
func (ec *executionContext) unmarshalOLanguageTranslation2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐLanguageTranslation(ctx context.Context, v interface{}) (*models.LanguageTranslation, error) {
if v == nil {
return nil, nil
}
var res = new(models.LanguageTranslation)
err := res.UnmarshalGQL(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOLanguageTranslation2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐLanguageTranslation(ctx context.Context, sel ast.SelectionSet, v *models.LanguageTranslation) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return v
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalOMedia2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx context.Context, sel ast.SelectionSet, v *models.Media) graphql.Marshaler {
2020-02-09 15:26:59 +01:00
if v == nil {
return graphql.Null
2020-02-09 15:26:59 +01:00
}
return ec._Media(ctx, sel, v)
2020-02-09 15:26:59 +01:00
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalOMediaEXIF2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaEXIF(ctx context.Context, sel ast.SelectionSet, v *models.MediaEXIF) graphql.Marshaler {
2020-11-28 17:31:19 +01:00
if v == nil {
return graphql.Null
}
return ec._MediaEXIF(ctx, sel, v)
2020-02-09 15:26:59 +01:00
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalOMediaURL2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMediaURL(ctx context.Context, sel ast.SelectionSet, v *models.MediaURL) graphql.Marshaler {
2020-02-01 14:52:27 +01:00
if v == nil {
return graphql.Null
}
return ec._MediaURL(ctx, sel, v)
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) unmarshalOOrderDirection2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐOrderDirection(ctx context.Context, v interface{}) (*models.OrderDirection, error) {
if v == nil {
return nil, nil
}
var res = new(models.OrderDirection)
err := res.UnmarshalGQL(v)
return res, graphql.ErrorOnPath(ctx, err)
2020-02-02 00:29:42 +01:00
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalOOrderDirection2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐOrderDirection(ctx context.Context, sel ast.SelectionSet, v *models.OrderDirection) graphql.Marshaler {
2020-02-02 00:29:42 +01:00
if v == nil {
return graphql.Null
}
return v
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) unmarshalOOrdering2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐOrdering(ctx context.Context, v interface{}) (*models.Ordering, error) {
if v == nil {
return nil, nil
}
res, err := ec.unmarshalInputOrdering(ctx, v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) unmarshalOPagination2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐPagination(ctx context.Context, v interface{}) (*models.Pagination, error) {
if v == nil {
return nil, nil
}
res, err := ec.unmarshalInputPagination(ctx, v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) unmarshalOShareTokenCredentials2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐShareTokenCredentials(ctx context.Context, v interface{}) (*models.ShareTokenCredentials, error) {
if v == nil {
return nil, nil
}
res, err := ec.unmarshalInputShareTokenCredentials(ctx, v)
return &res, graphql.ErrorOnPath(ctx, err)
}
2020-01-30 14:28:14 +01:00
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)
2020-01-30 14:28:14 +01:00
}
func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
if v == nil {
return graphql.Null
}
2022-02-01 23:39:19 +01:00
res := graphql.MarshalString(*v)
return res
2020-02-02 00:29:42 +01:00
}
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)
2020-02-02 00:29:42 +01:00
}
func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
if v == nil {
return graphql.Null
}
2022-02-01 23:39:19 +01:00
res := graphql.MarshalTime(*v)
return res
2020-02-16 12:22:00 +01:00
}
2020-12-17 22:51:43 +01:00
func (ec *executionContext) marshalOVideoMetadata2ᚖgithubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐVideoMetadata(ctx context.Context, sel ast.SelectionSet, v *models.VideoMetadata) graphql.Marshaler {
2020-07-12 14:17:49 +02:00
if v == nil {
return graphql.Null
}
return ec._VideoMetadata(ctx, sel, v)
}
2020-01-30 14:28:14 +01:00
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{
2020-01-30 14:28:14 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
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()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-01-30 14:28:14 +01:00
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{
2020-01-30 14:28:14 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
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()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-01-30 14:28:14 +01:00
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{
2020-01-30 14:28:14 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
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()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-01-30 14:28:14 +01:00
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{
2020-01-30 14:28:14 +01:00
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
2020-01-30 14:28:14 +01:00
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()
2022-02-01 23:39:19 +01:00
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
2020-01-30 14:28:14 +01:00
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 *****************************