tercul-backend/internal/adapters/graphql/generated.go
google-labs-jules[bot] f8b3ecb9bd feat: Implement trending works feature
This commit introduces a new trending works feature to the application.

The feature includes:
- A new `Trending` domain model to store ranked works.
- An `UpdateTrending` method in the `AnalyticsService` that calculates a trending score for each work based on views, likes, and comments.
- A background job that runs hourly to update the trending works.
- A new `trendingWorks` query in the GraphQL API to expose the trending works.
- New tests for the trending feature, and fixes for existing tests.

This commit also includes a refactoring of the analytics repository to use a more generic `IncrementWorkCounter` method, and enhancements to the `WorkStats` and `TranslationStats` models with new metrics like `readingTime`, `complexity`, and `sentiment`.
2025-09-07 20:40:35 +00:00

35717 lines
1.0 MiB

// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
package graphql
import (
"bytes"
"context"
"embed"
"errors"
"fmt"
"strconv"
"sync"
"sync/atomic"
"tercul/internal/adapters/graphql/model"
"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/introspection"
gqlparser "github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
)
// region ************************** generated!.gotpl **************************
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
return &executableSchema{
schema: cfg.Schema,
resolvers: cfg.Resolvers,
directives: cfg.Directives,
complexity: cfg.Complexity,
}
}
type Config struct {
Schema *ast.Schema
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
}
type ResolverRoot interface {
Mutation() MutationResolver
Query() QueryResolver
}
type DirectiveRoot struct {
Binding func(ctx context.Context, obj any, next graphql.Resolver, constraint string) (res any, err error)
}
type ComplexityRoot struct {
Address struct {
Authors func(childComplexity int) int
City func(childComplexity int) int
Country func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Street func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Users func(childComplexity int) int
}
AuthPayload struct {
Token func(childComplexity int) int
User func(childComplexity int) int
}
Author struct {
Address func(childComplexity int) int
Biography func(childComplexity int) int
BirthDate func(childComplexity int) int
Books func(childComplexity int) int
City func(childComplexity int) int
Copyright func(childComplexity int) int
CopyrightClaims func(childComplexity int) int
Country func(childComplexity int) int
CreatedAt func(childComplexity int) int
DeathDate func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
Place func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Works func(childComplexity int) int
}
Book struct {
Copyright func(childComplexity int) int
CopyrightClaims func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
Stats func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Works func(childComplexity int) int
}
BookStats struct {
Book func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Sales func(childComplexity int) int
UpdatedAt func(childComplexity int) int
}
Bookmark struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
User func(childComplexity int) int
Work func(childComplexity int) int
}
Category struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Works func(childComplexity int) int
}
City struct {
Authors func(childComplexity int) int
Country func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Users func(childComplexity int) int
}
Collection struct {
CreatedAt func(childComplexity int) int
Description func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
Stats func(childComplexity int) int
UpdatedAt func(childComplexity int) int
User func(childComplexity int) int
Works func(childComplexity int) int
}
CollectionStats struct {
Collection func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Items func(childComplexity int) int
UpdatedAt func(childComplexity int) int
}
Comment struct {
ChildComments func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Likes func(childComplexity int) int
LineNumber func(childComplexity int) int
ParentComment func(childComplexity int) int
Text func(childComplexity int) int
Translation func(childComplexity int) int
UpdatedAt func(childComplexity int) int
User func(childComplexity int) int
Work func(childComplexity int) int
}
Concept struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Words func(childComplexity int) int
Works func(childComplexity int) int
}
Contribution struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
Status func(childComplexity int) int
Translation func(childComplexity int) int
UpdatedAt func(childComplexity int) int
User func(childComplexity int) int
Work func(childComplexity int) int
}
Copyright struct {
Books func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
Sources func(childComplexity int) int
Translations func(childComplexity int) int
UpdatedAt func(childComplexity int) int
WorkOwner func(childComplexity int) int
Works func(childComplexity int) int
}
CopyrightClaim struct {
Author func(childComplexity int) int
Book func(childComplexity int) int
CreatedAt func(childComplexity int) int
Details func(childComplexity int) int
ID func(childComplexity int) int
Source func(childComplexity int) int
Translation func(childComplexity int) int
UpdatedAt func(childComplexity int) int
User func(childComplexity int) int
Work func(childComplexity int) int
}
Country struct {
Authors func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Users func(childComplexity int) int
}
Edge struct {
CreatedAt func(childComplexity int) int
Extra func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Relation func(childComplexity int) int
SourceID func(childComplexity int) int
SourceTable func(childComplexity int) int
TargetID func(childComplexity int) int
TargetTable func(childComplexity int) int
UpdatedAt func(childComplexity int) int
}
Emotion struct {
Collection func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
User func(childComplexity int) int
Work func(childComplexity int) int
}
Like struct {
Comment func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Translation func(childComplexity int) int
UpdatedAt func(childComplexity int) int
User func(childComplexity int) int
Work func(childComplexity int) int
}
LinguisticLayer struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Works func(childComplexity int) int
}
Mood struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Works func(childComplexity int) int
}
Mutation struct {
AddWorkToCollection func(childComplexity int, collectionID string, workID string) int
ChangePassword func(childComplexity int, currentPassword string, newPassword string) int
CreateAuthor func(childComplexity int, input model.AuthorInput) int
CreateBookmark func(childComplexity int, input model.BookmarkInput) int
CreateCollection func(childComplexity int, input model.CollectionInput) int
CreateComment func(childComplexity int, input model.CommentInput) int
CreateContribution func(childComplexity int, input model.ContributionInput) int
CreateLike func(childComplexity int, input model.LikeInput) int
CreateTranslation func(childComplexity int, input model.TranslationInput) int
CreateWork func(childComplexity int, input model.WorkInput) int
DeleteAuthor func(childComplexity int, id string) int
DeleteBookmark func(childComplexity int, id string) int
DeleteCollection func(childComplexity int, id string) int
DeleteComment func(childComplexity int, id string) int
DeleteContribution func(childComplexity int, id string) int
DeleteLike func(childComplexity int, id string) int
DeleteTranslation func(childComplexity int, id string) int
DeleteUser func(childComplexity int, id string) int
DeleteWork func(childComplexity int, id string) int
ForgotPassword func(childComplexity int, email string) int
Login func(childComplexity int, input model.LoginInput) int
Logout func(childComplexity int) int
RefreshToken func(childComplexity int) int
Register func(childComplexity int, input model.RegisterInput) int
RemoveWorkFromCollection func(childComplexity int, collectionID string, workID string) int
ResendVerificationEmail func(childComplexity int, email string) int
ResetPassword func(childComplexity int, token string, newPassword string) int
ReviewContribution func(childComplexity int, id string, status model.ContributionStatus, feedback *string) int
UpdateAuthor func(childComplexity int, id string, input model.AuthorInput) int
UpdateCollection func(childComplexity int, id string, input model.CollectionInput) int
UpdateComment func(childComplexity int, id string, input model.CommentInput) int
UpdateContribution func(childComplexity int, id string, input model.ContributionInput) int
UpdateProfile func(childComplexity int, input model.UserInput) int
UpdateTranslation func(childComplexity int, id string, input model.TranslationInput) int
UpdateUser func(childComplexity int, id string, input model.UserInput) int
UpdateWork func(childComplexity int, id string, input model.WorkInput) int
VerifyEmail func(childComplexity int, token string) int
}
Place struct {
Authors func(childComplexity int) int
City func(childComplexity int) int
Country func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
}
PoeticAnalysis struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Structure func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Work func(childComplexity int) int
}
Query struct {
Author func(childComplexity int, id string) int
Authors func(childComplexity int, limit *int32, offset *int32, search *string, countryID *string) int
Categories func(childComplexity int, limit *int32, offset *int32) int
Category func(childComplexity int, id string) int
Collection func(childComplexity int, id string) int
Collections func(childComplexity int, userID *string, limit *int32, offset *int32) int
Comment func(childComplexity int, id string) int
Comments func(childComplexity int, workID *string, translationID *string, userID *string, limit *int32, offset *int32) int
Me func(childComplexity int) int
Search func(childComplexity int, query string, limit *int32, offset *int32, filters *model.SearchFilters) int
Tag func(childComplexity int, id string) int
Tags func(childComplexity int, limit *int32, offset *int32) int
Translation func(childComplexity int, id string) int
Translations func(childComplexity int, workID string, language *string, limit *int32, offset *int32) int
TrendingWorks func(childComplexity int, timePeriod *string, limit *int32) int
User func(childComplexity int, id string) int
UserByEmail func(childComplexity int, email string) int
UserByUsername func(childComplexity int, username string) int
UserProfile func(childComplexity int, userID string) int
Users func(childComplexity int, limit *int32, offset *int32, role *model.UserRole) int
Work func(childComplexity int, id string) int
Works func(childComplexity int, limit *int32, offset *int32, language *string, authorID *string, categoryID *string, tagID *string, search *string) int
}
ReadabilityScore struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Score func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Work func(childComplexity int) int
}
SearchResults struct {
Authors func(childComplexity int) int
Total func(childComplexity int) int
Translations func(childComplexity int) int
Works func(childComplexity int) int
}
Source struct {
Copyright func(childComplexity int) int
CopyrightClaims func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Works func(childComplexity int) int
}
Tag struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Works func(childComplexity int) int
}
TextMetadata struct {
Analysis func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Work func(childComplexity int) int
}
TopicCluster struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Works func(childComplexity int) int
}
Translation struct {
Comments func(childComplexity int) int
Content func(childComplexity int) int
Copyright func(childComplexity int) int
CopyrightClaims func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Likes func(childComplexity int) int
Name func(childComplexity int) int
Stats func(childComplexity int) int
Translator func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Work func(childComplexity int) int
WorkID func(childComplexity int) int
}
TranslationStats struct {
Comments func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Likes func(childComplexity int) int
ReadingTime func(childComplexity int) int
Sentiment func(childComplexity int) int
Shares func(childComplexity int) int
Translation func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Views func(childComplexity int) int
}
User struct {
Active func(childComplexity int) int
Address func(childComplexity int) int
AvatarURL func(childComplexity int) int
Bio func(childComplexity int) int
Bookmarks func(childComplexity int) int
City func(childComplexity int) int
Collections func(childComplexity int) int
Comments func(childComplexity int) int
Contributions func(childComplexity int) int
Country func(childComplexity int) int
CreatedAt func(childComplexity int) int
DisplayName func(childComplexity int) int
Email func(childComplexity int) int
FirstName func(childComplexity int) int
ID func(childComplexity int) int
LastLoginAt func(childComplexity int) int
LastName func(childComplexity int) int
Likes func(childComplexity int) int
Role func(childComplexity int) int
Stats func(childComplexity int) int
Translations func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Username func(childComplexity int) int
Verified func(childComplexity int) int
}
UserProfile struct {
CreatedAt func(childComplexity int) int
Facebook func(childComplexity int) int
Github func(childComplexity int) int
ID func(childComplexity int) int
LinkedIn func(childComplexity int) int
PhoneNumber func(childComplexity int) int
Preferences func(childComplexity int) int
Settings func(childComplexity int) int
Twitter func(childComplexity int) int
UpdatedAt func(childComplexity int) int
User func(childComplexity int) int
UserID func(childComplexity int) int
Website func(childComplexity int) int
}
UserStats struct {
Activity func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
UpdatedAt func(childComplexity int) int
User func(childComplexity int) int
}
Word struct {
Concept func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Works func(childComplexity int) int
}
Work struct {
Authors func(childComplexity int) int
Bookmarks func(childComplexity int) int
Categories func(childComplexity int) int
Collections func(childComplexity int) int
Comments func(childComplexity int) int
Concepts func(childComplexity int) int
Content func(childComplexity int) int
Copyright func(childComplexity int) int
CopyrightClaims func(childComplexity int) int
CreatedAt func(childComplexity int) int
Emotions func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Likes func(childComplexity int) int
LinguisticLayers func(childComplexity int) int
Moods func(childComplexity int) int
Name func(childComplexity int) int
PoeticAnalysis func(childComplexity int) int
ReadabilityScore func(childComplexity int) int
Stats func(childComplexity int) int
Tags func(childComplexity int) int
TextMetadata func(childComplexity int) int
TopicClusters func(childComplexity int) int
Translations func(childComplexity int) int
UpdatedAt func(childComplexity int) int
WritingStyle func(childComplexity int) int
}
WorkStats struct {
Bookmarks func(childComplexity int) int
Comments func(childComplexity int) int
Complexity func(childComplexity int) int
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Likes func(childComplexity int) int
ReadingTime func(childComplexity int) int
Sentiment func(childComplexity int) int
Shares func(childComplexity int) int
TranslationCount func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Views func(childComplexity int) int
Work func(childComplexity int) int
}
WritingStyle struct {
CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
Language func(childComplexity int) int
Name func(childComplexity int) int
UpdatedAt func(childComplexity int) int
Work func(childComplexity int) int
}
}
type MutationResolver interface {
Register(ctx context.Context, input model.RegisterInput) (*model.AuthPayload, error)
Login(ctx context.Context, input model.LoginInput) (*model.AuthPayload, error)
CreateWork(ctx context.Context, input model.WorkInput) (*model.Work, error)
UpdateWork(ctx context.Context, id string, input model.WorkInput) (*model.Work, error)
DeleteWork(ctx context.Context, id string) (bool, error)
CreateTranslation(ctx context.Context, input model.TranslationInput) (*model.Translation, error)
UpdateTranslation(ctx context.Context, id string, input model.TranslationInput) (*model.Translation, error)
DeleteTranslation(ctx context.Context, id string) (bool, error)
CreateAuthor(ctx context.Context, input model.AuthorInput) (*model.Author, error)
UpdateAuthor(ctx context.Context, id string, input model.AuthorInput) (*model.Author, error)
DeleteAuthor(ctx context.Context, id string) (bool, error)
UpdateUser(ctx context.Context, id string, input model.UserInput) (*model.User, error)
DeleteUser(ctx context.Context, id string) (bool, error)
CreateCollection(ctx context.Context, input model.CollectionInput) (*model.Collection, error)
UpdateCollection(ctx context.Context, id string, input model.CollectionInput) (*model.Collection, error)
DeleteCollection(ctx context.Context, id string) (bool, error)
AddWorkToCollection(ctx context.Context, collectionID string, workID string) (*model.Collection, error)
RemoveWorkFromCollection(ctx context.Context, collectionID string, workID string) (*model.Collection, error)
CreateComment(ctx context.Context, input model.CommentInput) (*model.Comment, error)
UpdateComment(ctx context.Context, id string, input model.CommentInput) (*model.Comment, error)
DeleteComment(ctx context.Context, id string) (bool, error)
CreateLike(ctx context.Context, input model.LikeInput) (*model.Like, error)
DeleteLike(ctx context.Context, id string) (bool, error)
CreateBookmark(ctx context.Context, input model.BookmarkInput) (*model.Bookmark, error)
DeleteBookmark(ctx context.Context, id string) (bool, error)
CreateContribution(ctx context.Context, input model.ContributionInput) (*model.Contribution, error)
UpdateContribution(ctx context.Context, id string, input model.ContributionInput) (*model.Contribution, error)
DeleteContribution(ctx context.Context, id string) (bool, error)
ReviewContribution(ctx context.Context, id string, status model.ContributionStatus, feedback *string) (*model.Contribution, error)
Logout(ctx context.Context) (bool, error)
RefreshToken(ctx context.Context) (*model.AuthPayload, error)
ForgotPassword(ctx context.Context, email string) (bool, error)
ResetPassword(ctx context.Context, token string, newPassword string) (bool, error)
VerifyEmail(ctx context.Context, token string) (bool, error)
ResendVerificationEmail(ctx context.Context, email string) (bool, error)
UpdateProfile(ctx context.Context, input model.UserInput) (*model.User, error)
ChangePassword(ctx context.Context, currentPassword string, newPassword string) (bool, error)
}
type QueryResolver interface {
Work(ctx context.Context, id string) (*model.Work, error)
Works(ctx context.Context, limit *int32, offset *int32, language *string, authorID *string, categoryID *string, tagID *string, search *string) ([]*model.Work, error)
Translation(ctx context.Context, id string) (*model.Translation, error)
Translations(ctx context.Context, workID string, language *string, limit *int32, offset *int32) ([]*model.Translation, error)
Author(ctx context.Context, id string) (*model.Author, error)
Authors(ctx context.Context, limit *int32, offset *int32, search *string, countryID *string) ([]*model.Author, error)
User(ctx context.Context, id string) (*model.User, error)
UserByEmail(ctx context.Context, email string) (*model.User, error)
UserByUsername(ctx context.Context, username string) (*model.User, error)
Users(ctx context.Context, limit *int32, offset *int32, role *model.UserRole) ([]*model.User, error)
Me(ctx context.Context) (*model.User, error)
UserProfile(ctx context.Context, userID string) (*model.UserProfile, error)
Collection(ctx context.Context, id string) (*model.Collection, error)
Collections(ctx context.Context, userID *string, limit *int32, offset *int32) ([]*model.Collection, error)
Tag(ctx context.Context, id string) (*model.Tag, error)
Tags(ctx context.Context, limit *int32, offset *int32) ([]*model.Tag, error)
Category(ctx context.Context, id string) (*model.Category, error)
Categories(ctx context.Context, limit *int32, offset *int32) ([]*model.Category, error)
Comment(ctx context.Context, id string) (*model.Comment, error)
Comments(ctx context.Context, workID *string, translationID *string, userID *string, limit *int32, offset *int32) ([]*model.Comment, error)
Search(ctx context.Context, query string, limit *int32, offset *int32, filters *model.SearchFilters) (*model.SearchResults, error)
TrendingWorks(ctx context.Context, timePeriod *string, limit *int32) ([]*model.Work, error)
}
type executableSchema struct {
schema *ast.Schema
resolvers ResolverRoot
directives DirectiveRoot
complexity ComplexityRoot
}
func (e *executableSchema) Schema() *ast.Schema {
if e.schema != nil {
return e.schema
}
return parsedSchema
}
func (e *executableSchema) Complexity(ctx context.Context, typeName, field string, childComplexity int, rawArgs map[string]any) (int, bool) {
ec := executionContext{nil, e, 0, 0, nil}
_ = ec
switch typeName + "." + field {
case "Address.authors":
if e.complexity.Address.Authors == nil {
break
}
return e.complexity.Address.Authors(childComplexity), true
case "Address.city":
if e.complexity.Address.City == nil {
break
}
return e.complexity.Address.City(childComplexity), true
case "Address.country":
if e.complexity.Address.Country == nil {
break
}
return e.complexity.Address.Country(childComplexity), true
case "Address.createdAt":
if e.complexity.Address.CreatedAt == nil {
break
}
return e.complexity.Address.CreatedAt(childComplexity), true
case "Address.id":
if e.complexity.Address.ID == nil {
break
}
return e.complexity.Address.ID(childComplexity), true
case "Address.street":
if e.complexity.Address.Street == nil {
break
}
return e.complexity.Address.Street(childComplexity), true
case "Address.updatedAt":
if e.complexity.Address.UpdatedAt == nil {
break
}
return e.complexity.Address.UpdatedAt(childComplexity), true
case "Address.users":
if e.complexity.Address.Users == nil {
break
}
return e.complexity.Address.Users(childComplexity), true
case "AuthPayload.token":
if e.complexity.AuthPayload.Token == nil {
break
}
return e.complexity.AuthPayload.Token(childComplexity), true
case "AuthPayload.user":
if e.complexity.AuthPayload.User == nil {
break
}
return e.complexity.AuthPayload.User(childComplexity), true
case "Author.address":
if e.complexity.Author.Address == nil {
break
}
return e.complexity.Author.Address(childComplexity), true
case "Author.biography":
if e.complexity.Author.Biography == nil {
break
}
return e.complexity.Author.Biography(childComplexity), true
case "Author.birthDate":
if e.complexity.Author.BirthDate == nil {
break
}
return e.complexity.Author.BirthDate(childComplexity), true
case "Author.books":
if e.complexity.Author.Books == nil {
break
}
return e.complexity.Author.Books(childComplexity), true
case "Author.city":
if e.complexity.Author.City == nil {
break
}
return e.complexity.Author.City(childComplexity), true
case "Author.copyright":
if e.complexity.Author.Copyright == nil {
break
}
return e.complexity.Author.Copyright(childComplexity), true
case "Author.copyrightClaims":
if e.complexity.Author.CopyrightClaims == nil {
break
}
return e.complexity.Author.CopyrightClaims(childComplexity), true
case "Author.country":
if e.complexity.Author.Country == nil {
break
}
return e.complexity.Author.Country(childComplexity), true
case "Author.createdAt":
if e.complexity.Author.CreatedAt == nil {
break
}
return e.complexity.Author.CreatedAt(childComplexity), true
case "Author.deathDate":
if e.complexity.Author.DeathDate == nil {
break
}
return e.complexity.Author.DeathDate(childComplexity), true
case "Author.id":
if e.complexity.Author.ID == nil {
break
}
return e.complexity.Author.ID(childComplexity), true
case "Author.language":
if e.complexity.Author.Language == nil {
break
}
return e.complexity.Author.Language(childComplexity), true
case "Author.name":
if e.complexity.Author.Name == nil {
break
}
return e.complexity.Author.Name(childComplexity), true
case "Author.place":
if e.complexity.Author.Place == nil {
break
}
return e.complexity.Author.Place(childComplexity), true
case "Author.updatedAt":
if e.complexity.Author.UpdatedAt == nil {
break
}
return e.complexity.Author.UpdatedAt(childComplexity), true
case "Author.works":
if e.complexity.Author.Works == nil {
break
}
return e.complexity.Author.Works(childComplexity), true
case "Book.copyright":
if e.complexity.Book.Copyright == nil {
break
}
return e.complexity.Book.Copyright(childComplexity), true
case "Book.copyrightClaims":
if e.complexity.Book.CopyrightClaims == nil {
break
}
return e.complexity.Book.CopyrightClaims(childComplexity), true
case "Book.createdAt":
if e.complexity.Book.CreatedAt == nil {
break
}
return e.complexity.Book.CreatedAt(childComplexity), true
case "Book.id":
if e.complexity.Book.ID == nil {
break
}
return e.complexity.Book.ID(childComplexity), true
case "Book.language":
if e.complexity.Book.Language == nil {
break
}
return e.complexity.Book.Language(childComplexity), true
case "Book.name":
if e.complexity.Book.Name == nil {
break
}
return e.complexity.Book.Name(childComplexity), true
case "Book.stats":
if e.complexity.Book.Stats == nil {
break
}
return e.complexity.Book.Stats(childComplexity), true
case "Book.updatedAt":
if e.complexity.Book.UpdatedAt == nil {
break
}
return e.complexity.Book.UpdatedAt(childComplexity), true
case "Book.works":
if e.complexity.Book.Works == nil {
break
}
return e.complexity.Book.Works(childComplexity), true
case "BookStats.book":
if e.complexity.BookStats.Book == nil {
break
}
return e.complexity.BookStats.Book(childComplexity), true
case "BookStats.createdAt":
if e.complexity.BookStats.CreatedAt == nil {
break
}
return e.complexity.BookStats.CreatedAt(childComplexity), true
case "BookStats.id":
if e.complexity.BookStats.ID == nil {
break
}
return e.complexity.BookStats.ID(childComplexity), true
case "BookStats.sales":
if e.complexity.BookStats.Sales == nil {
break
}
return e.complexity.BookStats.Sales(childComplexity), true
case "BookStats.updatedAt":
if e.complexity.BookStats.UpdatedAt == nil {
break
}
return e.complexity.BookStats.UpdatedAt(childComplexity), true
case "Bookmark.createdAt":
if e.complexity.Bookmark.CreatedAt == nil {
break
}
return e.complexity.Bookmark.CreatedAt(childComplexity), true
case "Bookmark.id":
if e.complexity.Bookmark.ID == nil {
break
}
return e.complexity.Bookmark.ID(childComplexity), true
case "Bookmark.name":
if e.complexity.Bookmark.Name == nil {
break
}
return e.complexity.Bookmark.Name(childComplexity), true
case "Bookmark.updatedAt":
if e.complexity.Bookmark.UpdatedAt == nil {
break
}
return e.complexity.Bookmark.UpdatedAt(childComplexity), true
case "Bookmark.user":
if e.complexity.Bookmark.User == nil {
break
}
return e.complexity.Bookmark.User(childComplexity), true
case "Bookmark.work":
if e.complexity.Bookmark.Work == nil {
break
}
return e.complexity.Bookmark.Work(childComplexity), true
case "Category.createdAt":
if e.complexity.Category.CreatedAt == nil {
break
}
return e.complexity.Category.CreatedAt(childComplexity), true
case "Category.id":
if e.complexity.Category.ID == nil {
break
}
return e.complexity.Category.ID(childComplexity), true
case "Category.name":
if e.complexity.Category.Name == nil {
break
}
return e.complexity.Category.Name(childComplexity), true
case "Category.updatedAt":
if e.complexity.Category.UpdatedAt == nil {
break
}
return e.complexity.Category.UpdatedAt(childComplexity), true
case "Category.works":
if e.complexity.Category.Works == nil {
break
}
return e.complexity.Category.Works(childComplexity), true
case "City.authors":
if e.complexity.City.Authors == nil {
break
}
return e.complexity.City.Authors(childComplexity), true
case "City.country":
if e.complexity.City.Country == nil {
break
}
return e.complexity.City.Country(childComplexity), true
case "City.createdAt":
if e.complexity.City.CreatedAt == nil {
break
}
return e.complexity.City.CreatedAt(childComplexity), true
case "City.id":
if e.complexity.City.ID == nil {
break
}
return e.complexity.City.ID(childComplexity), true
case "City.language":
if e.complexity.City.Language == nil {
break
}
return e.complexity.City.Language(childComplexity), true
case "City.name":
if e.complexity.City.Name == nil {
break
}
return e.complexity.City.Name(childComplexity), true
case "City.updatedAt":
if e.complexity.City.UpdatedAt == nil {
break
}
return e.complexity.City.UpdatedAt(childComplexity), true
case "City.users":
if e.complexity.City.Users == nil {
break
}
return e.complexity.City.Users(childComplexity), true
case "Collection.createdAt":
if e.complexity.Collection.CreatedAt == nil {
break
}
return e.complexity.Collection.CreatedAt(childComplexity), true
case "Collection.description":
if e.complexity.Collection.Description == nil {
break
}
return e.complexity.Collection.Description(childComplexity), true
case "Collection.id":
if e.complexity.Collection.ID == nil {
break
}
return e.complexity.Collection.ID(childComplexity), true
case "Collection.name":
if e.complexity.Collection.Name == nil {
break
}
return e.complexity.Collection.Name(childComplexity), true
case "Collection.stats":
if e.complexity.Collection.Stats == nil {
break
}
return e.complexity.Collection.Stats(childComplexity), true
case "Collection.updatedAt":
if e.complexity.Collection.UpdatedAt == nil {
break
}
return e.complexity.Collection.UpdatedAt(childComplexity), true
case "Collection.user":
if e.complexity.Collection.User == nil {
break
}
return e.complexity.Collection.User(childComplexity), true
case "Collection.works":
if e.complexity.Collection.Works == nil {
break
}
return e.complexity.Collection.Works(childComplexity), true
case "CollectionStats.collection":
if e.complexity.CollectionStats.Collection == nil {
break
}
return e.complexity.CollectionStats.Collection(childComplexity), true
case "CollectionStats.createdAt":
if e.complexity.CollectionStats.CreatedAt == nil {
break
}
return e.complexity.CollectionStats.CreatedAt(childComplexity), true
case "CollectionStats.id":
if e.complexity.CollectionStats.ID == nil {
break
}
return e.complexity.CollectionStats.ID(childComplexity), true
case "CollectionStats.items":
if e.complexity.CollectionStats.Items == nil {
break
}
return e.complexity.CollectionStats.Items(childComplexity), true
case "CollectionStats.updatedAt":
if e.complexity.CollectionStats.UpdatedAt == nil {
break
}
return e.complexity.CollectionStats.UpdatedAt(childComplexity), true
case "Comment.childComments":
if e.complexity.Comment.ChildComments == nil {
break
}
return e.complexity.Comment.ChildComments(childComplexity), true
case "Comment.createdAt":
if e.complexity.Comment.CreatedAt == nil {
break
}
return e.complexity.Comment.CreatedAt(childComplexity), true
case "Comment.id":
if e.complexity.Comment.ID == nil {
break
}
return e.complexity.Comment.ID(childComplexity), true
case "Comment.likes":
if e.complexity.Comment.Likes == nil {
break
}
return e.complexity.Comment.Likes(childComplexity), true
case "Comment.lineNumber":
if e.complexity.Comment.LineNumber == nil {
break
}
return e.complexity.Comment.LineNumber(childComplexity), true
case "Comment.parentComment":
if e.complexity.Comment.ParentComment == nil {
break
}
return e.complexity.Comment.ParentComment(childComplexity), true
case "Comment.text":
if e.complexity.Comment.Text == nil {
break
}
return e.complexity.Comment.Text(childComplexity), true
case "Comment.translation":
if e.complexity.Comment.Translation == nil {
break
}
return e.complexity.Comment.Translation(childComplexity), true
case "Comment.updatedAt":
if e.complexity.Comment.UpdatedAt == nil {
break
}
return e.complexity.Comment.UpdatedAt(childComplexity), true
case "Comment.user":
if e.complexity.Comment.User == nil {
break
}
return e.complexity.Comment.User(childComplexity), true
case "Comment.work":
if e.complexity.Comment.Work == nil {
break
}
return e.complexity.Comment.Work(childComplexity), true
case "Concept.createdAt":
if e.complexity.Concept.CreatedAt == nil {
break
}
return e.complexity.Concept.CreatedAt(childComplexity), true
case "Concept.id":
if e.complexity.Concept.ID == nil {
break
}
return e.complexity.Concept.ID(childComplexity), true
case "Concept.name":
if e.complexity.Concept.Name == nil {
break
}
return e.complexity.Concept.Name(childComplexity), true
case "Concept.updatedAt":
if e.complexity.Concept.UpdatedAt == nil {
break
}
return e.complexity.Concept.UpdatedAt(childComplexity), true
case "Concept.words":
if e.complexity.Concept.Words == nil {
break
}
return e.complexity.Concept.Words(childComplexity), true
case "Concept.works":
if e.complexity.Concept.Works == nil {
break
}
return e.complexity.Concept.Works(childComplexity), true
case "Contribution.createdAt":
if e.complexity.Contribution.CreatedAt == nil {
break
}
return e.complexity.Contribution.CreatedAt(childComplexity), true
case "Contribution.id":
if e.complexity.Contribution.ID == nil {
break
}
return e.complexity.Contribution.ID(childComplexity), true
case "Contribution.name":
if e.complexity.Contribution.Name == nil {
break
}
return e.complexity.Contribution.Name(childComplexity), true
case "Contribution.status":
if e.complexity.Contribution.Status == nil {
break
}
return e.complexity.Contribution.Status(childComplexity), true
case "Contribution.translation":
if e.complexity.Contribution.Translation == nil {
break
}
return e.complexity.Contribution.Translation(childComplexity), true
case "Contribution.updatedAt":
if e.complexity.Contribution.UpdatedAt == nil {
break
}
return e.complexity.Contribution.UpdatedAt(childComplexity), true
case "Contribution.user":
if e.complexity.Contribution.User == nil {
break
}
return e.complexity.Contribution.User(childComplexity), true
case "Contribution.work":
if e.complexity.Contribution.Work == nil {
break
}
return e.complexity.Contribution.Work(childComplexity), true
case "Copyright.books":
if e.complexity.Copyright.Books == nil {
break
}
return e.complexity.Copyright.Books(childComplexity), true
case "Copyright.createdAt":
if e.complexity.Copyright.CreatedAt == nil {
break
}
return e.complexity.Copyright.CreatedAt(childComplexity), true
case "Copyright.id":
if e.complexity.Copyright.ID == nil {
break
}
return e.complexity.Copyright.ID(childComplexity), true
case "Copyright.language":
if e.complexity.Copyright.Language == nil {
break
}
return e.complexity.Copyright.Language(childComplexity), true
case "Copyright.name":
if e.complexity.Copyright.Name == nil {
break
}
return e.complexity.Copyright.Name(childComplexity), true
case "Copyright.sources":
if e.complexity.Copyright.Sources == nil {
break
}
return e.complexity.Copyright.Sources(childComplexity), true
case "Copyright.translations":
if e.complexity.Copyright.Translations == nil {
break
}
return e.complexity.Copyright.Translations(childComplexity), true
case "Copyright.updatedAt":
if e.complexity.Copyright.UpdatedAt == nil {
break
}
return e.complexity.Copyright.UpdatedAt(childComplexity), true
case "Copyright.workOwner":
if e.complexity.Copyright.WorkOwner == nil {
break
}
return e.complexity.Copyright.WorkOwner(childComplexity), true
case "Copyright.works":
if e.complexity.Copyright.Works == nil {
break
}
return e.complexity.Copyright.Works(childComplexity), true
case "CopyrightClaim.author":
if e.complexity.CopyrightClaim.Author == nil {
break
}
return e.complexity.CopyrightClaim.Author(childComplexity), true
case "CopyrightClaim.book":
if e.complexity.CopyrightClaim.Book == nil {
break
}
return e.complexity.CopyrightClaim.Book(childComplexity), true
case "CopyrightClaim.createdAt":
if e.complexity.CopyrightClaim.CreatedAt == nil {
break
}
return e.complexity.CopyrightClaim.CreatedAt(childComplexity), true
case "CopyrightClaim.details":
if e.complexity.CopyrightClaim.Details == nil {
break
}
return e.complexity.CopyrightClaim.Details(childComplexity), true
case "CopyrightClaim.id":
if e.complexity.CopyrightClaim.ID == nil {
break
}
return e.complexity.CopyrightClaim.ID(childComplexity), true
case "CopyrightClaim.source":
if e.complexity.CopyrightClaim.Source == nil {
break
}
return e.complexity.CopyrightClaim.Source(childComplexity), true
case "CopyrightClaim.translation":
if e.complexity.CopyrightClaim.Translation == nil {
break
}
return e.complexity.CopyrightClaim.Translation(childComplexity), true
case "CopyrightClaim.updatedAt":
if e.complexity.CopyrightClaim.UpdatedAt == nil {
break
}
return e.complexity.CopyrightClaim.UpdatedAt(childComplexity), true
case "CopyrightClaim.user":
if e.complexity.CopyrightClaim.User == nil {
break
}
return e.complexity.CopyrightClaim.User(childComplexity), true
case "CopyrightClaim.work":
if e.complexity.CopyrightClaim.Work == nil {
break
}
return e.complexity.CopyrightClaim.Work(childComplexity), true
case "Country.authors":
if e.complexity.Country.Authors == nil {
break
}
return e.complexity.Country.Authors(childComplexity), true
case "Country.createdAt":
if e.complexity.Country.CreatedAt == nil {
break
}
return e.complexity.Country.CreatedAt(childComplexity), true
case "Country.id":
if e.complexity.Country.ID == nil {
break
}
return e.complexity.Country.ID(childComplexity), true
case "Country.language":
if e.complexity.Country.Language == nil {
break
}
return e.complexity.Country.Language(childComplexity), true
case "Country.name":
if e.complexity.Country.Name == nil {
break
}
return e.complexity.Country.Name(childComplexity), true
case "Country.updatedAt":
if e.complexity.Country.UpdatedAt == nil {
break
}
return e.complexity.Country.UpdatedAt(childComplexity), true
case "Country.users":
if e.complexity.Country.Users == nil {
break
}
return e.complexity.Country.Users(childComplexity), true
case "Edge.createdAt":
if e.complexity.Edge.CreatedAt == nil {
break
}
return e.complexity.Edge.CreatedAt(childComplexity), true
case "Edge.extra":
if e.complexity.Edge.Extra == nil {
break
}
return e.complexity.Edge.Extra(childComplexity), true
case "Edge.id":
if e.complexity.Edge.ID == nil {
break
}
return e.complexity.Edge.ID(childComplexity), true
case "Edge.language":
if e.complexity.Edge.Language == nil {
break
}
return e.complexity.Edge.Language(childComplexity), true
case "Edge.relation":
if e.complexity.Edge.Relation == nil {
break
}
return e.complexity.Edge.Relation(childComplexity), true
case "Edge.sourceId":
if e.complexity.Edge.SourceID == nil {
break
}
return e.complexity.Edge.SourceID(childComplexity), true
case "Edge.sourceTable":
if e.complexity.Edge.SourceTable == nil {
break
}
return e.complexity.Edge.SourceTable(childComplexity), true
case "Edge.targetId":
if e.complexity.Edge.TargetID == nil {
break
}
return e.complexity.Edge.TargetID(childComplexity), true
case "Edge.targetTable":
if e.complexity.Edge.TargetTable == nil {
break
}
return e.complexity.Edge.TargetTable(childComplexity), true
case "Edge.updatedAt":
if e.complexity.Edge.UpdatedAt == nil {
break
}
return e.complexity.Edge.UpdatedAt(childComplexity), true
case "Emotion.collection":
if e.complexity.Emotion.Collection == nil {
break
}
return e.complexity.Emotion.Collection(childComplexity), true
case "Emotion.createdAt":
if e.complexity.Emotion.CreatedAt == nil {
break
}
return e.complexity.Emotion.CreatedAt(childComplexity), true
case "Emotion.id":
if e.complexity.Emotion.ID == nil {
break
}
return e.complexity.Emotion.ID(childComplexity), true
case "Emotion.language":
if e.complexity.Emotion.Language == nil {
break
}
return e.complexity.Emotion.Language(childComplexity), true
case "Emotion.name":
if e.complexity.Emotion.Name == nil {
break
}
return e.complexity.Emotion.Name(childComplexity), true
case "Emotion.updatedAt":
if e.complexity.Emotion.UpdatedAt == nil {
break
}
return e.complexity.Emotion.UpdatedAt(childComplexity), true
case "Emotion.user":
if e.complexity.Emotion.User == nil {
break
}
return e.complexity.Emotion.User(childComplexity), true
case "Emotion.work":
if e.complexity.Emotion.Work == nil {
break
}
return e.complexity.Emotion.Work(childComplexity), true
case "Like.comment":
if e.complexity.Like.Comment == nil {
break
}
return e.complexity.Like.Comment(childComplexity), true
case "Like.createdAt":
if e.complexity.Like.CreatedAt == nil {
break
}
return e.complexity.Like.CreatedAt(childComplexity), true
case "Like.id":
if e.complexity.Like.ID == nil {
break
}
return e.complexity.Like.ID(childComplexity), true
case "Like.translation":
if e.complexity.Like.Translation == nil {
break
}
return e.complexity.Like.Translation(childComplexity), true
case "Like.updatedAt":
if e.complexity.Like.UpdatedAt == nil {
break
}
return e.complexity.Like.UpdatedAt(childComplexity), true
case "Like.user":
if e.complexity.Like.User == nil {
break
}
return e.complexity.Like.User(childComplexity), true
case "Like.work":
if e.complexity.Like.Work == nil {
break
}
return e.complexity.Like.Work(childComplexity), true
case "LinguisticLayer.createdAt":
if e.complexity.LinguisticLayer.CreatedAt == nil {
break
}
return e.complexity.LinguisticLayer.CreatedAt(childComplexity), true
case "LinguisticLayer.id":
if e.complexity.LinguisticLayer.ID == nil {
break
}
return e.complexity.LinguisticLayer.ID(childComplexity), true
case "LinguisticLayer.language":
if e.complexity.LinguisticLayer.Language == nil {
break
}
return e.complexity.LinguisticLayer.Language(childComplexity), true
case "LinguisticLayer.name":
if e.complexity.LinguisticLayer.Name == nil {
break
}
return e.complexity.LinguisticLayer.Name(childComplexity), true
case "LinguisticLayer.updatedAt":
if e.complexity.LinguisticLayer.UpdatedAt == nil {
break
}
return e.complexity.LinguisticLayer.UpdatedAt(childComplexity), true
case "LinguisticLayer.works":
if e.complexity.LinguisticLayer.Works == nil {
break
}
return e.complexity.LinguisticLayer.Works(childComplexity), true
case "Mood.createdAt":
if e.complexity.Mood.CreatedAt == nil {
break
}
return e.complexity.Mood.CreatedAt(childComplexity), true
case "Mood.id":
if e.complexity.Mood.ID == nil {
break
}
return e.complexity.Mood.ID(childComplexity), true
case "Mood.language":
if e.complexity.Mood.Language == nil {
break
}
return e.complexity.Mood.Language(childComplexity), true
case "Mood.name":
if e.complexity.Mood.Name == nil {
break
}
return e.complexity.Mood.Name(childComplexity), true
case "Mood.updatedAt":
if e.complexity.Mood.UpdatedAt == nil {
break
}
return e.complexity.Mood.UpdatedAt(childComplexity), true
case "Mood.works":
if e.complexity.Mood.Works == nil {
break
}
return e.complexity.Mood.Works(childComplexity), true
case "Mutation.addWorkToCollection":
if e.complexity.Mutation.AddWorkToCollection == nil {
break
}
args, err := ec.field_Mutation_addWorkToCollection_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.AddWorkToCollection(childComplexity, args["collectionId"].(string), args["workId"].(string)), true
case "Mutation.changePassword":
if e.complexity.Mutation.ChangePassword == nil {
break
}
args, err := ec.field_Mutation_changePassword_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.ChangePassword(childComplexity, args["currentPassword"].(string), args["newPassword"].(string)), true
case "Mutation.createAuthor":
if e.complexity.Mutation.CreateAuthor == nil {
break
}
args, err := ec.field_Mutation_createAuthor_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.CreateAuthor(childComplexity, args["input"].(model.AuthorInput)), true
case "Mutation.createBookmark":
if e.complexity.Mutation.CreateBookmark == nil {
break
}
args, err := ec.field_Mutation_createBookmark_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.CreateBookmark(childComplexity, args["input"].(model.BookmarkInput)), true
case "Mutation.createCollection":
if e.complexity.Mutation.CreateCollection == nil {
break
}
args, err := ec.field_Mutation_createCollection_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.CreateCollection(childComplexity, args["input"].(model.CollectionInput)), true
case "Mutation.createComment":
if e.complexity.Mutation.CreateComment == nil {
break
}
args, err := ec.field_Mutation_createComment_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.CreateComment(childComplexity, args["input"].(model.CommentInput)), true
case "Mutation.createContribution":
if e.complexity.Mutation.CreateContribution == nil {
break
}
args, err := ec.field_Mutation_createContribution_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.CreateContribution(childComplexity, args["input"].(model.ContributionInput)), true
case "Mutation.createLike":
if e.complexity.Mutation.CreateLike == nil {
break
}
args, err := ec.field_Mutation_createLike_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.CreateLike(childComplexity, args["input"].(model.LikeInput)), true
case "Mutation.createTranslation":
if e.complexity.Mutation.CreateTranslation == nil {
break
}
args, err := ec.field_Mutation_createTranslation_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.CreateTranslation(childComplexity, args["input"].(model.TranslationInput)), true
case "Mutation.createWork":
if e.complexity.Mutation.CreateWork == nil {
break
}
args, err := ec.field_Mutation_createWork_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.CreateWork(childComplexity, args["input"].(model.WorkInput)), true
case "Mutation.deleteAuthor":
if e.complexity.Mutation.DeleteAuthor == nil {
break
}
args, err := ec.field_Mutation_deleteAuthor_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteAuthor(childComplexity, args["id"].(string)), true
case "Mutation.deleteBookmark":
if e.complexity.Mutation.DeleteBookmark == nil {
break
}
args, err := ec.field_Mutation_deleteBookmark_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteBookmark(childComplexity, args["id"].(string)), true
case "Mutation.deleteCollection":
if e.complexity.Mutation.DeleteCollection == nil {
break
}
args, err := ec.field_Mutation_deleteCollection_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteCollection(childComplexity, args["id"].(string)), true
case "Mutation.deleteComment":
if e.complexity.Mutation.DeleteComment == nil {
break
}
args, err := ec.field_Mutation_deleteComment_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteComment(childComplexity, args["id"].(string)), true
case "Mutation.deleteContribution":
if e.complexity.Mutation.DeleteContribution == nil {
break
}
args, err := ec.field_Mutation_deleteContribution_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteContribution(childComplexity, args["id"].(string)), true
case "Mutation.deleteLike":
if e.complexity.Mutation.DeleteLike == nil {
break
}
args, err := ec.field_Mutation_deleteLike_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteLike(childComplexity, args["id"].(string)), true
case "Mutation.deleteTranslation":
if e.complexity.Mutation.DeleteTranslation == nil {
break
}
args, err := ec.field_Mutation_deleteTranslation_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteTranslation(childComplexity, args["id"].(string)), true
case "Mutation.deleteUser":
if e.complexity.Mutation.DeleteUser == nil {
break
}
args, err := ec.field_Mutation_deleteUser_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteUser(childComplexity, args["id"].(string)), true
case "Mutation.deleteWork":
if e.complexity.Mutation.DeleteWork == nil {
break
}
args, err := ec.field_Mutation_deleteWork_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.DeleteWork(childComplexity, args["id"].(string)), true
case "Mutation.forgotPassword":
if e.complexity.Mutation.ForgotPassword == nil {
break
}
args, err := ec.field_Mutation_forgotPassword_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.ForgotPassword(childComplexity, args["email"].(string)), true
case "Mutation.login":
if e.complexity.Mutation.Login == nil {
break
}
args, err := ec.field_Mutation_login_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.Login(childComplexity, args["input"].(model.LoginInput)), true
case "Mutation.logout":
if e.complexity.Mutation.Logout == nil {
break
}
return e.complexity.Mutation.Logout(childComplexity), true
case "Mutation.refreshToken":
if e.complexity.Mutation.RefreshToken == nil {
break
}
return e.complexity.Mutation.RefreshToken(childComplexity), true
case "Mutation.register":
if e.complexity.Mutation.Register == nil {
break
}
args, err := ec.field_Mutation_register_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.Register(childComplexity, args["input"].(model.RegisterInput)), true
case "Mutation.removeWorkFromCollection":
if e.complexity.Mutation.RemoveWorkFromCollection == nil {
break
}
args, err := ec.field_Mutation_removeWorkFromCollection_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.RemoveWorkFromCollection(childComplexity, args["collectionId"].(string), args["workId"].(string)), true
case "Mutation.resendVerificationEmail":
if e.complexity.Mutation.ResendVerificationEmail == nil {
break
}
args, err := ec.field_Mutation_resendVerificationEmail_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.ResendVerificationEmail(childComplexity, args["email"].(string)), true
case "Mutation.resetPassword":
if e.complexity.Mutation.ResetPassword == nil {
break
}
args, err := ec.field_Mutation_resetPassword_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.ResetPassword(childComplexity, args["token"].(string), args["newPassword"].(string)), true
case "Mutation.reviewContribution":
if e.complexity.Mutation.ReviewContribution == nil {
break
}
args, err := ec.field_Mutation_reviewContribution_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.ReviewContribution(childComplexity, args["id"].(string), args["status"].(model.ContributionStatus), args["feedback"].(*string)), true
case "Mutation.updateAuthor":
if e.complexity.Mutation.UpdateAuthor == nil {
break
}
args, err := ec.field_Mutation_updateAuthor_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UpdateAuthor(childComplexity, args["id"].(string), args["input"].(model.AuthorInput)), true
case "Mutation.updateCollection":
if e.complexity.Mutation.UpdateCollection == nil {
break
}
args, err := ec.field_Mutation_updateCollection_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UpdateCollection(childComplexity, args["id"].(string), args["input"].(model.CollectionInput)), true
case "Mutation.updateComment":
if e.complexity.Mutation.UpdateComment == nil {
break
}
args, err := ec.field_Mutation_updateComment_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UpdateComment(childComplexity, args["id"].(string), args["input"].(model.CommentInput)), true
case "Mutation.updateContribution":
if e.complexity.Mutation.UpdateContribution == nil {
break
}
args, err := ec.field_Mutation_updateContribution_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UpdateContribution(childComplexity, args["id"].(string), args["input"].(model.ContributionInput)), true
case "Mutation.updateProfile":
if e.complexity.Mutation.UpdateProfile == nil {
break
}
args, err := ec.field_Mutation_updateProfile_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UpdateProfile(childComplexity, args["input"].(model.UserInput)), true
case "Mutation.updateTranslation":
if e.complexity.Mutation.UpdateTranslation == nil {
break
}
args, err := ec.field_Mutation_updateTranslation_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UpdateTranslation(childComplexity, args["id"].(string), args["input"].(model.TranslationInput)), true
case "Mutation.updateUser":
if e.complexity.Mutation.UpdateUser == nil {
break
}
args, err := ec.field_Mutation_updateUser_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UpdateUser(childComplexity, args["id"].(string), args["input"].(model.UserInput)), true
case "Mutation.updateWork":
if e.complexity.Mutation.UpdateWork == nil {
break
}
args, err := ec.field_Mutation_updateWork_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.UpdateWork(childComplexity, args["id"].(string), args["input"].(model.WorkInput)), true
case "Mutation.verifyEmail":
if e.complexity.Mutation.VerifyEmail == nil {
break
}
args, err := ec.field_Mutation_verifyEmail_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Mutation.VerifyEmail(childComplexity, args["token"].(string)), true
case "Place.authors":
if e.complexity.Place.Authors == nil {
break
}
return e.complexity.Place.Authors(childComplexity), true
case "Place.city":
if e.complexity.Place.City == nil {
break
}
return e.complexity.Place.City(childComplexity), true
case "Place.country":
if e.complexity.Place.Country == nil {
break
}
return e.complexity.Place.Country(childComplexity), true
case "Place.createdAt":
if e.complexity.Place.CreatedAt == nil {
break
}
return e.complexity.Place.CreatedAt(childComplexity), true
case "Place.id":
if e.complexity.Place.ID == nil {
break
}
return e.complexity.Place.ID(childComplexity), true
case "Place.language":
if e.complexity.Place.Language == nil {
break
}
return e.complexity.Place.Language(childComplexity), true
case "Place.name":
if e.complexity.Place.Name == nil {
break
}
return e.complexity.Place.Name(childComplexity), true
case "Place.updatedAt":
if e.complexity.Place.UpdatedAt == nil {
break
}
return e.complexity.Place.UpdatedAt(childComplexity), true
case "PoeticAnalysis.createdAt":
if e.complexity.PoeticAnalysis.CreatedAt == nil {
break
}
return e.complexity.PoeticAnalysis.CreatedAt(childComplexity), true
case "PoeticAnalysis.id":
if e.complexity.PoeticAnalysis.ID == nil {
break
}
return e.complexity.PoeticAnalysis.ID(childComplexity), true
case "PoeticAnalysis.language":
if e.complexity.PoeticAnalysis.Language == nil {
break
}
return e.complexity.PoeticAnalysis.Language(childComplexity), true
case "PoeticAnalysis.structure":
if e.complexity.PoeticAnalysis.Structure == nil {
break
}
return e.complexity.PoeticAnalysis.Structure(childComplexity), true
case "PoeticAnalysis.updatedAt":
if e.complexity.PoeticAnalysis.UpdatedAt == nil {
break
}
return e.complexity.PoeticAnalysis.UpdatedAt(childComplexity), true
case "PoeticAnalysis.work":
if e.complexity.PoeticAnalysis.Work == nil {
break
}
return e.complexity.PoeticAnalysis.Work(childComplexity), true
case "Query.author":
if e.complexity.Query.Author == nil {
break
}
args, err := ec.field_Query_author_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Author(childComplexity, args["id"].(string)), true
case "Query.authors":
if e.complexity.Query.Authors == nil {
break
}
args, err := ec.field_Query_authors_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Authors(childComplexity, args["limit"].(*int32), args["offset"].(*int32), args["search"].(*string), args["countryId"].(*string)), true
case "Query.categories":
if e.complexity.Query.Categories == nil {
break
}
args, err := ec.field_Query_categories_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Categories(childComplexity, args["limit"].(*int32), args["offset"].(*int32)), true
case "Query.category":
if e.complexity.Query.Category == nil {
break
}
args, err := ec.field_Query_category_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Category(childComplexity, args["id"].(string)), true
case "Query.collection":
if e.complexity.Query.Collection == nil {
break
}
args, err := ec.field_Query_collection_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Collection(childComplexity, args["id"].(string)), true
case "Query.collections":
if e.complexity.Query.Collections == nil {
break
}
args, err := ec.field_Query_collections_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Collections(childComplexity, args["userId"].(*string), args["limit"].(*int32), args["offset"].(*int32)), true
case "Query.comment":
if e.complexity.Query.Comment == nil {
break
}
args, err := ec.field_Query_comment_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Comment(childComplexity, args["id"].(string)), true
case "Query.comments":
if e.complexity.Query.Comments == nil {
break
}
args, err := ec.field_Query_comments_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Comments(childComplexity, args["workId"].(*string), args["translationId"].(*string), args["userId"].(*string), args["limit"].(*int32), args["offset"].(*int32)), true
case "Query.me":
if e.complexity.Query.Me == nil {
break
}
return e.complexity.Query.Me(childComplexity), true
case "Query.search":
if e.complexity.Query.Search == nil {
break
}
args, err := ec.field_Query_search_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Search(childComplexity, args["query"].(string), args["limit"].(*int32), args["offset"].(*int32), args["filters"].(*model.SearchFilters)), true
case "Query.tag":
if e.complexity.Query.Tag == nil {
break
}
args, err := ec.field_Query_tag_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Tag(childComplexity, args["id"].(string)), true
case "Query.tags":
if e.complexity.Query.Tags == nil {
break
}
args, err := ec.field_Query_tags_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Tags(childComplexity, args["limit"].(*int32), args["offset"].(*int32)), true
case "Query.translation":
if e.complexity.Query.Translation == nil {
break
}
args, err := ec.field_Query_translation_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Translation(childComplexity, args["id"].(string)), true
case "Query.translations":
if e.complexity.Query.Translations == nil {
break
}
args, err := ec.field_Query_translations_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Translations(childComplexity, args["workId"].(string), args["language"].(*string), args["limit"].(*int32), args["offset"].(*int32)), true
case "Query.trendingWorks":
if e.complexity.Query.TrendingWorks == nil {
break
}
args, err := ec.field_Query_trendingWorks_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.TrendingWorks(childComplexity, args["timePeriod"].(*string), args["limit"].(*int32)), true
case "Query.user":
if e.complexity.Query.User == nil {
break
}
args, err := ec.field_Query_user_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.User(childComplexity, args["id"].(string)), true
case "Query.userByEmail":
if e.complexity.Query.UserByEmail == nil {
break
}
args, err := ec.field_Query_userByEmail_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.UserByEmail(childComplexity, args["email"].(string)), true
case "Query.userByUsername":
if e.complexity.Query.UserByUsername == nil {
break
}
args, err := ec.field_Query_userByUsername_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.UserByUsername(childComplexity, args["username"].(string)), true
case "Query.userProfile":
if e.complexity.Query.UserProfile == nil {
break
}
args, err := ec.field_Query_userProfile_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.UserProfile(childComplexity, args["userId"].(string)), true
case "Query.users":
if e.complexity.Query.Users == nil {
break
}
args, err := ec.field_Query_users_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Users(childComplexity, args["limit"].(*int32), args["offset"].(*int32), args["role"].(*model.UserRole)), true
case "Query.work":
if e.complexity.Query.Work == nil {
break
}
args, err := ec.field_Query_work_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Work(childComplexity, args["id"].(string)), true
case "Query.works":
if e.complexity.Query.Works == nil {
break
}
args, err := ec.field_Query_works_args(ctx, rawArgs)
if err != nil {
return 0, false
}
return e.complexity.Query.Works(childComplexity, args["limit"].(*int32), args["offset"].(*int32), args["language"].(*string), args["authorId"].(*string), args["categoryId"].(*string), args["tagId"].(*string), args["search"].(*string)), true
case "ReadabilityScore.createdAt":
if e.complexity.ReadabilityScore.CreatedAt == nil {
break
}
return e.complexity.ReadabilityScore.CreatedAt(childComplexity), true
case "ReadabilityScore.id":
if e.complexity.ReadabilityScore.ID == nil {
break
}
return e.complexity.ReadabilityScore.ID(childComplexity), true
case "ReadabilityScore.language":
if e.complexity.ReadabilityScore.Language == nil {
break
}
return e.complexity.ReadabilityScore.Language(childComplexity), true
case "ReadabilityScore.score":
if e.complexity.ReadabilityScore.Score == nil {
break
}
return e.complexity.ReadabilityScore.Score(childComplexity), true
case "ReadabilityScore.updatedAt":
if e.complexity.ReadabilityScore.UpdatedAt == nil {
break
}
return e.complexity.ReadabilityScore.UpdatedAt(childComplexity), true
case "ReadabilityScore.work":
if e.complexity.ReadabilityScore.Work == nil {
break
}
return e.complexity.ReadabilityScore.Work(childComplexity), true
case "SearchResults.authors":
if e.complexity.SearchResults.Authors == nil {
break
}
return e.complexity.SearchResults.Authors(childComplexity), true
case "SearchResults.total":
if e.complexity.SearchResults.Total == nil {
break
}
return e.complexity.SearchResults.Total(childComplexity), true
case "SearchResults.translations":
if e.complexity.SearchResults.Translations == nil {
break
}
return e.complexity.SearchResults.Translations(childComplexity), true
case "SearchResults.works":
if e.complexity.SearchResults.Works == nil {
break
}
return e.complexity.SearchResults.Works(childComplexity), true
case "Source.copyright":
if e.complexity.Source.Copyright == nil {
break
}
return e.complexity.Source.Copyright(childComplexity), true
case "Source.copyrightClaims":
if e.complexity.Source.CopyrightClaims == nil {
break
}
return e.complexity.Source.CopyrightClaims(childComplexity), true
case "Source.createdAt":
if e.complexity.Source.CreatedAt == nil {
break
}
return e.complexity.Source.CreatedAt(childComplexity), true
case "Source.id":
if e.complexity.Source.ID == nil {
break
}
return e.complexity.Source.ID(childComplexity), true
case "Source.language":
if e.complexity.Source.Language == nil {
break
}
return e.complexity.Source.Language(childComplexity), true
case "Source.name":
if e.complexity.Source.Name == nil {
break
}
return e.complexity.Source.Name(childComplexity), true
case "Source.updatedAt":
if e.complexity.Source.UpdatedAt == nil {
break
}
return e.complexity.Source.UpdatedAt(childComplexity), true
case "Source.works":
if e.complexity.Source.Works == nil {
break
}
return e.complexity.Source.Works(childComplexity), true
case "Tag.createdAt":
if e.complexity.Tag.CreatedAt == nil {
break
}
return e.complexity.Tag.CreatedAt(childComplexity), true
case "Tag.id":
if e.complexity.Tag.ID == nil {
break
}
return e.complexity.Tag.ID(childComplexity), true
case "Tag.name":
if e.complexity.Tag.Name == nil {
break
}
return e.complexity.Tag.Name(childComplexity), true
case "Tag.updatedAt":
if e.complexity.Tag.UpdatedAt == nil {
break
}
return e.complexity.Tag.UpdatedAt(childComplexity), true
case "Tag.works":
if e.complexity.Tag.Works == nil {
break
}
return e.complexity.Tag.Works(childComplexity), true
case "TextMetadata.analysis":
if e.complexity.TextMetadata.Analysis == nil {
break
}
return e.complexity.TextMetadata.Analysis(childComplexity), true
case "TextMetadata.createdAt":
if e.complexity.TextMetadata.CreatedAt == nil {
break
}
return e.complexity.TextMetadata.CreatedAt(childComplexity), true
case "TextMetadata.id":
if e.complexity.TextMetadata.ID == nil {
break
}
return e.complexity.TextMetadata.ID(childComplexity), true
case "TextMetadata.language":
if e.complexity.TextMetadata.Language == nil {
break
}
return e.complexity.TextMetadata.Language(childComplexity), true
case "TextMetadata.updatedAt":
if e.complexity.TextMetadata.UpdatedAt == nil {
break
}
return e.complexity.TextMetadata.UpdatedAt(childComplexity), true
case "TextMetadata.work":
if e.complexity.TextMetadata.Work == nil {
break
}
return e.complexity.TextMetadata.Work(childComplexity), true
case "TopicCluster.createdAt":
if e.complexity.TopicCluster.CreatedAt == nil {
break
}
return e.complexity.TopicCluster.CreatedAt(childComplexity), true
case "TopicCluster.id":
if e.complexity.TopicCluster.ID == nil {
break
}
return e.complexity.TopicCluster.ID(childComplexity), true
case "TopicCluster.name":
if e.complexity.TopicCluster.Name == nil {
break
}
return e.complexity.TopicCluster.Name(childComplexity), true
case "TopicCluster.updatedAt":
if e.complexity.TopicCluster.UpdatedAt == nil {
break
}
return e.complexity.TopicCluster.UpdatedAt(childComplexity), true
case "TopicCluster.works":
if e.complexity.TopicCluster.Works == nil {
break
}
return e.complexity.TopicCluster.Works(childComplexity), true
case "Translation.comments":
if e.complexity.Translation.Comments == nil {
break
}
return e.complexity.Translation.Comments(childComplexity), true
case "Translation.content":
if e.complexity.Translation.Content == nil {
break
}
return e.complexity.Translation.Content(childComplexity), true
case "Translation.copyright":
if e.complexity.Translation.Copyright == nil {
break
}
return e.complexity.Translation.Copyright(childComplexity), true
case "Translation.copyrightClaims":
if e.complexity.Translation.CopyrightClaims == nil {
break
}
return e.complexity.Translation.CopyrightClaims(childComplexity), true
case "Translation.createdAt":
if e.complexity.Translation.CreatedAt == nil {
break
}
return e.complexity.Translation.CreatedAt(childComplexity), true
case "Translation.id":
if e.complexity.Translation.ID == nil {
break
}
return e.complexity.Translation.ID(childComplexity), true
case "Translation.language":
if e.complexity.Translation.Language == nil {
break
}
return e.complexity.Translation.Language(childComplexity), true
case "Translation.likes":
if e.complexity.Translation.Likes == nil {
break
}
return e.complexity.Translation.Likes(childComplexity), true
case "Translation.name":
if e.complexity.Translation.Name == nil {
break
}
return e.complexity.Translation.Name(childComplexity), true
case "Translation.stats":
if e.complexity.Translation.Stats == nil {
break
}
return e.complexity.Translation.Stats(childComplexity), true
case "Translation.translator":
if e.complexity.Translation.Translator == nil {
break
}
return e.complexity.Translation.Translator(childComplexity), true
case "Translation.updatedAt":
if e.complexity.Translation.UpdatedAt == nil {
break
}
return e.complexity.Translation.UpdatedAt(childComplexity), true
case "Translation.work":
if e.complexity.Translation.Work == nil {
break
}
return e.complexity.Translation.Work(childComplexity), true
case "Translation.workId":
if e.complexity.Translation.WorkID == nil {
break
}
return e.complexity.Translation.WorkID(childComplexity), true
case "TranslationStats.comments":
if e.complexity.TranslationStats.Comments == nil {
break
}
return e.complexity.TranslationStats.Comments(childComplexity), true
case "TranslationStats.createdAt":
if e.complexity.TranslationStats.CreatedAt == nil {
break
}
return e.complexity.TranslationStats.CreatedAt(childComplexity), true
case "TranslationStats.id":
if e.complexity.TranslationStats.ID == nil {
break
}
return e.complexity.TranslationStats.ID(childComplexity), true
case "TranslationStats.likes":
if e.complexity.TranslationStats.Likes == nil {
break
}
return e.complexity.TranslationStats.Likes(childComplexity), true
case "TranslationStats.readingTime":
if e.complexity.TranslationStats.ReadingTime == nil {
break
}
return e.complexity.TranslationStats.ReadingTime(childComplexity), true
case "TranslationStats.sentiment":
if e.complexity.TranslationStats.Sentiment == nil {
break
}
return e.complexity.TranslationStats.Sentiment(childComplexity), true
case "TranslationStats.shares":
if e.complexity.TranslationStats.Shares == nil {
break
}
return e.complexity.TranslationStats.Shares(childComplexity), true
case "TranslationStats.translation":
if e.complexity.TranslationStats.Translation == nil {
break
}
return e.complexity.TranslationStats.Translation(childComplexity), true
case "TranslationStats.updatedAt":
if e.complexity.TranslationStats.UpdatedAt == nil {
break
}
return e.complexity.TranslationStats.UpdatedAt(childComplexity), true
case "TranslationStats.views":
if e.complexity.TranslationStats.Views == nil {
break
}
return e.complexity.TranslationStats.Views(childComplexity), true
case "User.active":
if e.complexity.User.Active == nil {
break
}
return e.complexity.User.Active(childComplexity), true
case "User.address":
if e.complexity.User.Address == nil {
break
}
return e.complexity.User.Address(childComplexity), true
case "User.avatarUrl":
if e.complexity.User.AvatarURL == nil {
break
}
return e.complexity.User.AvatarURL(childComplexity), true
case "User.bio":
if e.complexity.User.Bio == nil {
break
}
return e.complexity.User.Bio(childComplexity), true
case "User.bookmarks":
if e.complexity.User.Bookmarks == nil {
break
}
return e.complexity.User.Bookmarks(childComplexity), true
case "User.city":
if e.complexity.User.City == nil {
break
}
return e.complexity.User.City(childComplexity), true
case "User.collections":
if e.complexity.User.Collections == nil {
break
}
return e.complexity.User.Collections(childComplexity), true
case "User.comments":
if e.complexity.User.Comments == nil {
break
}
return e.complexity.User.Comments(childComplexity), true
case "User.contributions":
if e.complexity.User.Contributions == nil {
break
}
return e.complexity.User.Contributions(childComplexity), true
case "User.country":
if e.complexity.User.Country == nil {
break
}
return e.complexity.User.Country(childComplexity), true
case "User.createdAt":
if e.complexity.User.CreatedAt == nil {
break
}
return e.complexity.User.CreatedAt(childComplexity), true
case "User.displayName":
if e.complexity.User.DisplayName == nil {
break
}
return e.complexity.User.DisplayName(childComplexity), true
case "User.email":
if e.complexity.User.Email == nil {
break
}
return e.complexity.User.Email(childComplexity), true
case "User.firstName":
if e.complexity.User.FirstName == nil {
break
}
return e.complexity.User.FirstName(childComplexity), true
case "User.id":
if e.complexity.User.ID == nil {
break
}
return e.complexity.User.ID(childComplexity), true
case "User.lastLoginAt":
if e.complexity.User.LastLoginAt == nil {
break
}
return e.complexity.User.LastLoginAt(childComplexity), true
case "User.lastName":
if e.complexity.User.LastName == nil {
break
}
return e.complexity.User.LastName(childComplexity), true
case "User.likes":
if e.complexity.User.Likes == nil {
break
}
return e.complexity.User.Likes(childComplexity), true
case "User.role":
if e.complexity.User.Role == nil {
break
}
return e.complexity.User.Role(childComplexity), true
case "User.stats":
if e.complexity.User.Stats == nil {
break
}
return e.complexity.User.Stats(childComplexity), true
case "User.translations":
if e.complexity.User.Translations == nil {
break
}
return e.complexity.User.Translations(childComplexity), true
case "User.updatedAt":
if e.complexity.User.UpdatedAt == nil {
break
}
return e.complexity.User.UpdatedAt(childComplexity), true
case "User.username":
if e.complexity.User.Username == nil {
break
}
return e.complexity.User.Username(childComplexity), true
case "User.verified":
if e.complexity.User.Verified == nil {
break
}
return e.complexity.User.Verified(childComplexity), true
case "UserProfile.createdAt":
if e.complexity.UserProfile.CreatedAt == nil {
break
}
return e.complexity.UserProfile.CreatedAt(childComplexity), true
case "UserProfile.facebook":
if e.complexity.UserProfile.Facebook == nil {
break
}
return e.complexity.UserProfile.Facebook(childComplexity), true
case "UserProfile.github":
if e.complexity.UserProfile.Github == nil {
break
}
return e.complexity.UserProfile.Github(childComplexity), true
case "UserProfile.id":
if e.complexity.UserProfile.ID == nil {
break
}
return e.complexity.UserProfile.ID(childComplexity), true
case "UserProfile.linkedIn":
if e.complexity.UserProfile.LinkedIn == nil {
break
}
return e.complexity.UserProfile.LinkedIn(childComplexity), true
case "UserProfile.phoneNumber":
if e.complexity.UserProfile.PhoneNumber == nil {
break
}
return e.complexity.UserProfile.PhoneNumber(childComplexity), true
case "UserProfile.preferences":
if e.complexity.UserProfile.Preferences == nil {
break
}
return e.complexity.UserProfile.Preferences(childComplexity), true
case "UserProfile.settings":
if e.complexity.UserProfile.Settings == nil {
break
}
return e.complexity.UserProfile.Settings(childComplexity), true
case "UserProfile.twitter":
if e.complexity.UserProfile.Twitter == nil {
break
}
return e.complexity.UserProfile.Twitter(childComplexity), true
case "UserProfile.updatedAt":
if e.complexity.UserProfile.UpdatedAt == nil {
break
}
return e.complexity.UserProfile.UpdatedAt(childComplexity), true
case "UserProfile.user":
if e.complexity.UserProfile.User == nil {
break
}
return e.complexity.UserProfile.User(childComplexity), true
case "UserProfile.userId":
if e.complexity.UserProfile.UserID == nil {
break
}
return e.complexity.UserProfile.UserID(childComplexity), true
case "UserProfile.website":
if e.complexity.UserProfile.Website == nil {
break
}
return e.complexity.UserProfile.Website(childComplexity), true
case "UserStats.activity":
if e.complexity.UserStats.Activity == nil {
break
}
return e.complexity.UserStats.Activity(childComplexity), true
case "UserStats.createdAt":
if e.complexity.UserStats.CreatedAt == nil {
break
}
return e.complexity.UserStats.CreatedAt(childComplexity), true
case "UserStats.id":
if e.complexity.UserStats.ID == nil {
break
}
return e.complexity.UserStats.ID(childComplexity), true
case "UserStats.updatedAt":
if e.complexity.UserStats.UpdatedAt == nil {
break
}
return e.complexity.UserStats.UpdatedAt(childComplexity), true
case "UserStats.user":
if e.complexity.UserStats.User == nil {
break
}
return e.complexity.UserStats.User(childComplexity), true
case "Word.concept":
if e.complexity.Word.Concept == nil {
break
}
return e.complexity.Word.Concept(childComplexity), true
case "Word.createdAt":
if e.complexity.Word.CreatedAt == nil {
break
}
return e.complexity.Word.CreatedAt(childComplexity), true
case "Word.id":
if e.complexity.Word.ID == nil {
break
}
return e.complexity.Word.ID(childComplexity), true
case "Word.name":
if e.complexity.Word.Name == nil {
break
}
return e.complexity.Word.Name(childComplexity), true
case "Word.updatedAt":
if e.complexity.Word.UpdatedAt == nil {
break
}
return e.complexity.Word.UpdatedAt(childComplexity), true
case "Word.works":
if e.complexity.Word.Works == nil {
break
}
return e.complexity.Word.Works(childComplexity), true
case "Work.authors":
if e.complexity.Work.Authors == nil {
break
}
return e.complexity.Work.Authors(childComplexity), true
case "Work.bookmarks":
if e.complexity.Work.Bookmarks == nil {
break
}
return e.complexity.Work.Bookmarks(childComplexity), true
case "Work.categories":
if e.complexity.Work.Categories == nil {
break
}
return e.complexity.Work.Categories(childComplexity), true
case "Work.collections":
if e.complexity.Work.Collections == nil {
break
}
return e.complexity.Work.Collections(childComplexity), true
case "Work.comments":
if e.complexity.Work.Comments == nil {
break
}
return e.complexity.Work.Comments(childComplexity), true
case "Work.concepts":
if e.complexity.Work.Concepts == nil {
break
}
return e.complexity.Work.Concepts(childComplexity), true
case "Work.content":
if e.complexity.Work.Content == nil {
break
}
return e.complexity.Work.Content(childComplexity), true
case "Work.copyright":
if e.complexity.Work.Copyright == nil {
break
}
return e.complexity.Work.Copyright(childComplexity), true
case "Work.copyrightClaims":
if e.complexity.Work.CopyrightClaims == nil {
break
}
return e.complexity.Work.CopyrightClaims(childComplexity), true
case "Work.createdAt":
if e.complexity.Work.CreatedAt == nil {
break
}
return e.complexity.Work.CreatedAt(childComplexity), true
case "Work.emotions":
if e.complexity.Work.Emotions == nil {
break
}
return e.complexity.Work.Emotions(childComplexity), true
case "Work.id":
if e.complexity.Work.ID == nil {
break
}
return e.complexity.Work.ID(childComplexity), true
case "Work.language":
if e.complexity.Work.Language == nil {
break
}
return e.complexity.Work.Language(childComplexity), true
case "Work.likes":
if e.complexity.Work.Likes == nil {
break
}
return e.complexity.Work.Likes(childComplexity), true
case "Work.linguisticLayers":
if e.complexity.Work.LinguisticLayers == nil {
break
}
return e.complexity.Work.LinguisticLayers(childComplexity), true
case "Work.moods":
if e.complexity.Work.Moods == nil {
break
}
return e.complexity.Work.Moods(childComplexity), true
case "Work.name":
if e.complexity.Work.Name == nil {
break
}
return e.complexity.Work.Name(childComplexity), true
case "Work.poeticAnalysis":
if e.complexity.Work.PoeticAnalysis == nil {
break
}
return e.complexity.Work.PoeticAnalysis(childComplexity), true
case "Work.readabilityScore":
if e.complexity.Work.ReadabilityScore == nil {
break
}
return e.complexity.Work.ReadabilityScore(childComplexity), true
case "Work.stats":
if e.complexity.Work.Stats == nil {
break
}
return e.complexity.Work.Stats(childComplexity), true
case "Work.tags":
if e.complexity.Work.Tags == nil {
break
}
return e.complexity.Work.Tags(childComplexity), true
case "Work.textMetadata":
if e.complexity.Work.TextMetadata == nil {
break
}
return e.complexity.Work.TextMetadata(childComplexity), true
case "Work.topicClusters":
if e.complexity.Work.TopicClusters == nil {
break
}
return e.complexity.Work.TopicClusters(childComplexity), true
case "Work.translations":
if e.complexity.Work.Translations == nil {
break
}
return e.complexity.Work.Translations(childComplexity), true
case "Work.updatedAt":
if e.complexity.Work.UpdatedAt == nil {
break
}
return e.complexity.Work.UpdatedAt(childComplexity), true
case "Work.writingStyle":
if e.complexity.Work.WritingStyle == nil {
break
}
return e.complexity.Work.WritingStyle(childComplexity), true
case "WorkStats.bookmarks":
if e.complexity.WorkStats.Bookmarks == nil {
break
}
return e.complexity.WorkStats.Bookmarks(childComplexity), true
case "WorkStats.comments":
if e.complexity.WorkStats.Comments == nil {
break
}
return e.complexity.WorkStats.Comments(childComplexity), true
case "WorkStats.complexity":
if e.complexity.WorkStats.Complexity == nil {
break
}
return e.complexity.WorkStats.Complexity(childComplexity), true
case "WorkStats.createdAt":
if e.complexity.WorkStats.CreatedAt == nil {
break
}
return e.complexity.WorkStats.CreatedAt(childComplexity), true
case "WorkStats.id":
if e.complexity.WorkStats.ID == nil {
break
}
return e.complexity.WorkStats.ID(childComplexity), true
case "WorkStats.likes":
if e.complexity.WorkStats.Likes == nil {
break
}
return e.complexity.WorkStats.Likes(childComplexity), true
case "WorkStats.readingTime":
if e.complexity.WorkStats.ReadingTime == nil {
break
}
return e.complexity.WorkStats.ReadingTime(childComplexity), true
case "WorkStats.sentiment":
if e.complexity.WorkStats.Sentiment == nil {
break
}
return e.complexity.WorkStats.Sentiment(childComplexity), true
case "WorkStats.shares":
if e.complexity.WorkStats.Shares == nil {
break
}
return e.complexity.WorkStats.Shares(childComplexity), true
case "WorkStats.translationCount":
if e.complexity.WorkStats.TranslationCount == nil {
break
}
return e.complexity.WorkStats.TranslationCount(childComplexity), true
case "WorkStats.updatedAt":
if e.complexity.WorkStats.UpdatedAt == nil {
break
}
return e.complexity.WorkStats.UpdatedAt(childComplexity), true
case "WorkStats.views":
if e.complexity.WorkStats.Views == nil {
break
}
return e.complexity.WorkStats.Views(childComplexity), true
case "WorkStats.work":
if e.complexity.WorkStats.Work == nil {
break
}
return e.complexity.WorkStats.Work(childComplexity), true
case "WritingStyle.createdAt":
if e.complexity.WritingStyle.CreatedAt == nil {
break
}
return e.complexity.WritingStyle.CreatedAt(childComplexity), true
case "WritingStyle.id":
if e.complexity.WritingStyle.ID == nil {
break
}
return e.complexity.WritingStyle.ID(childComplexity), true
case "WritingStyle.language":
if e.complexity.WritingStyle.Language == nil {
break
}
return e.complexity.WritingStyle.Language(childComplexity), true
case "WritingStyle.name":
if e.complexity.WritingStyle.Name == nil {
break
}
return e.complexity.WritingStyle.Name(childComplexity), true
case "WritingStyle.updatedAt":
if e.complexity.WritingStyle.UpdatedAt == nil {
break
}
return e.complexity.WritingStyle.UpdatedAt(childComplexity), true
case "WritingStyle.work":
if e.complexity.WritingStyle.Work == nil {
break
}
return e.complexity.WritingStyle.Work(childComplexity), true
}
return 0, false
}
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
opCtx := graphql.GetOperationContext(ctx)
ec := executionContext{opCtx, e, 0, 0, make(chan graphql.DeferredResult)}
inputUnmarshalMap := graphql.BuildUnmarshalerMap(
ec.unmarshalInputAuthorInput,
ec.unmarshalInputBookmarkInput,
ec.unmarshalInputCollectionInput,
ec.unmarshalInputCommentInput,
ec.unmarshalInputContributionInput,
ec.unmarshalInputLikeInput,
ec.unmarshalInputLoginInput,
ec.unmarshalInputRegisterInput,
ec.unmarshalInputSearchFilters,
ec.unmarshalInputTranslationInput,
ec.unmarshalInputUserInput,
ec.unmarshalInputWorkInput,
)
first := true
switch opCtx.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, opCtx.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, opCtx.Operation.SelectionSet)
var buf bytes.Buffer
data.MarshalGQL(&buf)
return &graphql.Response{
Data: buf.Bytes(),
}
}
default:
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
}
}
type executionContext struct {
*graphql.OperationContext
*executableSchema
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
}()
}
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
if ec.DisableIntrospection {
return nil, errors.New("introspection disabled")
}
return introspection.WrapSchema(ec.Schema()), nil
}
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
}
//go:embed "schema.graphqls"
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.graphqls", Input: sourceData("schema.graphqls"), BuiltIn: false},
}
var parsedSchema = gqlparser.MustLoadSchema(sources...)
// endregion ************************** generated!.gotpl **************************
// region ***************************** args.gotpl *****************************
func (ec *executionContext) dir_binding_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "constraint", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["constraint"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_addWorkToCollection_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "collectionId", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["collectionId"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "workId", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["workId"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_changePassword_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "currentPassword", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["currentPassword"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "newPassword", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["newPassword"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_createAuthor_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNAuthorInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_createBookmark_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNBookmarkInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookmarkInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_createCollection_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCollectionInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_createComment_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCommentInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_createContribution_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNContributionInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_createLike_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNLikeInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLikeInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_createTranslation_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNTranslationInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_createWork_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNWorkInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_deleteAuthor_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_deleteBookmark_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_deleteCollection_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_deleteComment_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_deleteContribution_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_deleteLike_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_deleteTranslation_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_deleteUser_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_deleteWork_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_forgotPassword_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "email", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["email"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_login_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNLoginInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLoginInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_register_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNRegisterInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐRegisterInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_removeWorkFromCollection_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "collectionId", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["collectionId"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "workId", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["workId"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_resendVerificationEmail_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "email", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["email"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_resetPassword_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "token", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["token"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "newPassword", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["newPassword"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_reviewContribution_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "status", ec.unmarshalNContributionStatus2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionStatus)
if err != nil {
return nil, err
}
args["status"] = arg1
arg2, err := graphql.ProcessArgField(ctx, rawArgs, "feedback", ec.unmarshalOString2ᚖstring)
if err != nil {
return nil, err
}
args["feedback"] = arg2
return args, nil
}
func (ec *executionContext) field_Mutation_updateAuthor_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNAuthorInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorInput)
if err != nil {
return nil, err
}
args["input"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_updateCollection_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCollectionInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionInput)
if err != nil {
return nil, err
}
args["input"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_updateComment_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNCommentInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentInput)
if err != nil {
return nil, err
}
args["input"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_updateContribution_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNContributionInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionInput)
if err != nil {
return nil, err
}
args["input"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_updateProfile_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNUserInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserInput)
if err != nil {
return nil, err
}
args["input"] = arg0
return args, nil
}
func (ec *executionContext) field_Mutation_updateTranslation_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNTranslationInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationInput)
if err != nil {
return nil, err
}
args["input"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_updateUser_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNUserInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserInput)
if err != nil {
return nil, err
}
args["input"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_updateWork_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNWorkInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkInput)
if err != nil {
return nil, err
}
args["input"] = arg1
return args, nil
}
func (ec *executionContext) field_Mutation_verifyEmail_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "token", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["token"] = arg0
return args, nil
}
func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "name", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["name"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_author_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_authors_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "offset", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["offset"] = arg1
arg2, err := graphql.ProcessArgField(ctx, rawArgs, "search", ec.unmarshalOString2ᚖstring)
if err != nil {
return nil, err
}
args["search"] = arg2
arg3, err := graphql.ProcessArgField(ctx, rawArgs, "countryId", ec.unmarshalOID2ᚖstring)
if err != nil {
return nil, err
}
args["countryId"] = arg3
return args, nil
}
func (ec *executionContext) field_Query_categories_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "offset", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["offset"] = arg1
return args, nil
}
func (ec *executionContext) field_Query_category_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_collection_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_collections_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "userId", ec.unmarshalOID2ᚖstring)
if err != nil {
return nil, err
}
args["userId"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg1
arg2, err := graphql.ProcessArgField(ctx, rawArgs, "offset", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["offset"] = arg2
return args, nil
}
func (ec *executionContext) field_Query_comment_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_comments_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "workId", ec.unmarshalOID2ᚖstring)
if err != nil {
return nil, err
}
args["workId"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "translationId", ec.unmarshalOID2ᚖstring)
if err != nil {
return nil, err
}
args["translationId"] = arg1
arg2, err := graphql.ProcessArgField(ctx, rawArgs, "userId", ec.unmarshalOID2ᚖstring)
if err != nil {
return nil, err
}
args["userId"] = arg2
arg3, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg3
arg4, err := graphql.ProcessArgField(ctx, rawArgs, "offset", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["offset"] = arg4
return args, nil
}
func (ec *executionContext) field_Query_search_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "query", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["query"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg1
arg2, err := graphql.ProcessArgField(ctx, rawArgs, "offset", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["offset"] = arg2
arg3, err := graphql.ProcessArgField(ctx, rawArgs, "filters", ec.unmarshalOSearchFilters2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSearchFilters)
if err != nil {
return nil, err
}
args["filters"] = arg3
return args, nil
}
func (ec *executionContext) field_Query_tag_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_tags_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "offset", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["offset"] = arg1
return args, nil
}
func (ec *executionContext) field_Query_translation_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_translations_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "workId", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["workId"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "language", ec.unmarshalOString2ᚖstring)
if err != nil {
return nil, err
}
args["language"] = arg1
arg2, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg2
arg3, err := graphql.ProcessArgField(ctx, rawArgs, "offset", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["offset"] = arg3
return args, nil
}
func (ec *executionContext) field_Query_trendingWorks_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "timePeriod", ec.unmarshalOString2ᚖstring)
if err != nil {
return nil, err
}
args["timePeriod"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg1
return args, nil
}
func (ec *executionContext) field_Query_userByEmail_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "email", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["email"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_userByUsername_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "username", ec.unmarshalNString2string)
if err != nil {
return nil, err
}
args["username"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_userProfile_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "userId", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["userId"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_users_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "offset", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["offset"] = arg1
arg2, err := graphql.ProcessArgField(ctx, rawArgs, "role", ec.unmarshalOUserRole2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserRole)
if err != nil {
return nil, err
}
args["role"] = arg2
return args, nil
}
func (ec *executionContext) field_Query_work_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "id", ec.unmarshalNID2string)
if err != nil {
return nil, err
}
args["id"] = arg0
return args, nil
}
func (ec *executionContext) field_Query_works_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "limit", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["limit"] = arg0
arg1, err := graphql.ProcessArgField(ctx, rawArgs, "offset", ec.unmarshalOInt2ᚖint32)
if err != nil {
return nil, err
}
args["offset"] = arg1
arg2, err := graphql.ProcessArgField(ctx, rawArgs, "language", ec.unmarshalOString2ᚖstring)
if err != nil {
return nil, err
}
args["language"] = arg2
arg3, err := graphql.ProcessArgField(ctx, rawArgs, "authorId", ec.unmarshalOID2ᚖstring)
if err != nil {
return nil, err
}
args["authorId"] = arg3
arg4, err := graphql.ProcessArgField(ctx, rawArgs, "categoryId", ec.unmarshalOID2ᚖstring)
if err != nil {
return nil, err
}
args["categoryId"] = arg4
arg5, err := graphql.ProcessArgField(ctx, rawArgs, "tagId", ec.unmarshalOID2ᚖstring)
if err != nil {
return nil, err
}
args["tagId"] = arg5
arg6, err := graphql.ProcessArgField(ctx, rawArgs, "search", ec.unmarshalOString2ᚖstring)
if err != nil {
return nil, err
}
args["search"] = arg6
return args, nil
}
func (ec *executionContext) field___Directive_args_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2ᚖbool)
if err != nil {
return nil, err
}
args["includeDeprecated"] = arg0
return args, nil
}
func (ec *executionContext) field___Field_args_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2ᚖbool)
if err != nil {
return nil, err
}
args["includeDeprecated"] = arg0
return args, nil
}
func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2bool)
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]any) (map[string]any, error) {
var err error
args := map[string]any{}
arg0, err := graphql.ProcessArgField(ctx, rawArgs, "includeDeprecated", ec.unmarshalOBoolean2bool)
if err != nil {
return nil, err
}
args["includeDeprecated"] = arg0
return args, nil
}
// endregion ***************************** args.gotpl *****************************
// region ************************** directives.gotpl **************************
// endregion ************************** directives.gotpl **************************
// region **************************** field.gotpl *****************************
func (ec *executionContext) _Address_id(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Address_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Address_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Address",
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) _Address_street(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Address_street(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Street, 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_Address_street(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Address",
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) _Address_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Address_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Address_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Address",
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) _Address_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Address_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Address_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Address",
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) _Address_city(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Address_city(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.City, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.City)
fc.Result = res
return ec.marshalOCity2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCity(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Address_city(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Address",
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_City_id(ctx, field)
case "name":
return ec.fieldContext_City_name(ctx, field)
case "language":
return ec.fieldContext_City_language(ctx, field)
case "createdAt":
return ec.fieldContext_City_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_City_updatedAt(ctx, field)
case "country":
return ec.fieldContext_City_country(ctx, field)
case "authors":
return ec.fieldContext_City_authors(ctx, field)
case "users":
return ec.fieldContext_City_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type City", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Address_country(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Address_country(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Country, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Country)
fc.Result = res
return ec.marshalOCountry2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCountry(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Address_country(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Address",
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_Country_id(ctx, field)
case "name":
return ec.fieldContext_Country_name(ctx, field)
case "language":
return ec.fieldContext_Country_language(ctx, field)
case "createdAt":
return ec.fieldContext_Country_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Country_updatedAt(ctx, field)
case "authors":
return ec.fieldContext_Country_authors(ctx, field)
case "users":
return ec.fieldContext_Country_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Country", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Address_authors(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Address_authors(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Authors, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Author)
fc.Result = res
return ec.marshalOAuthor2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Address_authors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Address",
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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Address_users(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Address_users(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Users, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.User)
fc.Result = res
return ec.marshalOUser2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Address_users(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Address",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _AuthPayload_token(ctx context.Context, field graphql.CollectedField, obj *model.AuthPayload) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_AuthPayload_token(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Token, 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_AuthPayload_token(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "AuthPayload",
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) _AuthPayload_user(ctx context.Context, field graphql.CollectedField, obj *model.AuthPayload) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_AuthPayload_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_AuthPayload_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "AuthPayload",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Author_id(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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) _Author_name(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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) _Author_language(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_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) (any, 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 {
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_Author_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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) _Author_biography(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_biography(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Biography, 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_Author_biography(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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) _Author_birthDate(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_birthDate(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.BirthDate, 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_Author_birthDate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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) _Author_deathDate(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_deathDate(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.DeathDate, 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_Author_deathDate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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) _Author_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Author_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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) _Author_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Author_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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) _Author_works(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Author_books(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_books(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Books, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Book)
fc.Result = res
return ec.marshalOBook2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_books(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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_Book_id(ctx, field)
case "name":
return ec.fieldContext_Book_name(ctx, field)
case "language":
return ec.fieldContext_Book_language(ctx, field)
case "createdAt":
return ec.fieldContext_Book_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Book_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Book_works(ctx, field)
case "stats":
return ec.fieldContext_Book_stats(ctx, field)
case "copyright":
return ec.fieldContext_Book_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Book_copyrightClaims(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Book", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Author_country(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_country(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Country, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Country)
fc.Result = res
return ec.marshalOCountry2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCountry(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_country(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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_Country_id(ctx, field)
case "name":
return ec.fieldContext_Country_name(ctx, field)
case "language":
return ec.fieldContext_Country_language(ctx, field)
case "createdAt":
return ec.fieldContext_Country_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Country_updatedAt(ctx, field)
case "authors":
return ec.fieldContext_Country_authors(ctx, field)
case "users":
return ec.fieldContext_Country_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Country", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Author_city(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_city(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.City, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.City)
fc.Result = res
return ec.marshalOCity2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCity(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_city(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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_City_id(ctx, field)
case "name":
return ec.fieldContext_City_name(ctx, field)
case "language":
return ec.fieldContext_City_language(ctx, field)
case "createdAt":
return ec.fieldContext_City_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_City_updatedAt(ctx, field)
case "country":
return ec.fieldContext_City_country(ctx, field)
case "authors":
return ec.fieldContext_City_authors(ctx, field)
case "users":
return ec.fieldContext_City_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type City", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Author_place(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_place(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Place, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Place)
fc.Result = res
return ec.marshalOPlace2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐPlace(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_place(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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_Place_id(ctx, field)
case "name":
return ec.fieldContext_Place_name(ctx, field)
case "language":
return ec.fieldContext_Place_language(ctx, field)
case "createdAt":
return ec.fieldContext_Place_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Place_updatedAt(ctx, field)
case "city":
return ec.fieldContext_Place_city(ctx, field)
case "country":
return ec.fieldContext_Place_country(ctx, field)
case "authors":
return ec.fieldContext_Place_authors(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Place", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Author_address(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_address(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Address, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Address)
fc.Result = res
return ec.marshalOAddress2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAddress(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_address(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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_Address_id(ctx, field)
case "street":
return ec.fieldContext_Address_street(ctx, field)
case "createdAt":
return ec.fieldContext_Address_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Address_updatedAt(ctx, field)
case "city":
return ec.fieldContext_Address_city(ctx, field)
case "country":
return ec.fieldContext_Address_country(ctx, field)
case "authors":
return ec.fieldContext_Address_authors(ctx, field)
case "users":
return ec.fieldContext_Address_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Address", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Author_copyrightClaims(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_copyrightClaims(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CopyrightClaims, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.CopyrightClaim)
fc.Result = res
return ec.marshalOCopyrightClaim2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyrightClaimᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_copyrightClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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_CopyrightClaim_id(ctx, field)
case "details":
return ec.fieldContext_CopyrightClaim_details(ctx, field)
case "createdAt":
return ec.fieldContext_CopyrightClaim_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_CopyrightClaim_updatedAt(ctx, field)
case "work":
return ec.fieldContext_CopyrightClaim_work(ctx, field)
case "translation":
return ec.fieldContext_CopyrightClaim_translation(ctx, field)
case "book":
return ec.fieldContext_CopyrightClaim_book(ctx, field)
case "source":
return ec.fieldContext_CopyrightClaim_source(ctx, field)
case "author":
return ec.fieldContext_CopyrightClaim_author(ctx, field)
case "user":
return ec.fieldContext_CopyrightClaim_user(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type CopyrightClaim", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Author_copyright(ctx context.Context, field graphql.CollectedField, obj *model.Author) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Author_copyright(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Copyright, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Copyright)
fc.Result = res
return ec.marshalOCopyright2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyright(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Author_copyright(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Author",
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_Copyright_id(ctx, field)
case "name":
return ec.fieldContext_Copyright_name(ctx, field)
case "language":
return ec.fieldContext_Copyright_language(ctx, field)
case "createdAt":
return ec.fieldContext_Copyright_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Copyright_updatedAt(ctx, field)
case "workOwner":
return ec.fieldContext_Copyright_workOwner(ctx, field)
case "works":
return ec.fieldContext_Copyright_works(ctx, field)
case "translations":
return ec.fieldContext_Copyright_translations(ctx, field)
case "books":
return ec.fieldContext_Copyright_books(ctx, field)
case "sources":
return ec.fieldContext_Copyright_sources(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Copyright", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Book_id(ctx context.Context, field graphql.CollectedField, obj *model.Book) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Book_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Book_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Book",
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) _Book_name(ctx context.Context, field graphql.CollectedField, obj *model.Book) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Book_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Book_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Book",
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) _Book_language(ctx context.Context, field graphql.CollectedField, obj *model.Book) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Book_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) (any, 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 {
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_Book_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Book",
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) _Book_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Book) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Book_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Book_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Book",
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) _Book_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Book) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Book_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Book_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Book",
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) _Book_works(ctx context.Context, field graphql.CollectedField, obj *model.Book) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Book_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Book_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Book",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Book_stats(ctx context.Context, field graphql.CollectedField, obj *model.Book) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Book_stats(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Stats, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.BookStats)
fc.Result = res
return ec.marshalOBookStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookStats(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Book_stats(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Book",
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_BookStats_id(ctx, field)
case "sales":
return ec.fieldContext_BookStats_sales(ctx, field)
case "createdAt":
return ec.fieldContext_BookStats_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_BookStats_updatedAt(ctx, field)
case "book":
return ec.fieldContext_BookStats_book(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type BookStats", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Book_copyright(ctx context.Context, field graphql.CollectedField, obj *model.Book) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Book_copyright(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Copyright, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Copyright)
fc.Result = res
return ec.marshalOCopyright2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyright(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Book_copyright(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Book",
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_Copyright_id(ctx, field)
case "name":
return ec.fieldContext_Copyright_name(ctx, field)
case "language":
return ec.fieldContext_Copyright_language(ctx, field)
case "createdAt":
return ec.fieldContext_Copyright_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Copyright_updatedAt(ctx, field)
case "workOwner":
return ec.fieldContext_Copyright_workOwner(ctx, field)
case "works":
return ec.fieldContext_Copyright_works(ctx, field)
case "translations":
return ec.fieldContext_Copyright_translations(ctx, field)
case "books":
return ec.fieldContext_Copyright_books(ctx, field)
case "sources":
return ec.fieldContext_Copyright_sources(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Copyright", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Book_copyrightClaims(ctx context.Context, field graphql.CollectedField, obj *model.Book) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Book_copyrightClaims(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CopyrightClaims, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.CopyrightClaim)
fc.Result = res
return ec.marshalOCopyrightClaim2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyrightClaimᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Book_copyrightClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Book",
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_CopyrightClaim_id(ctx, field)
case "details":
return ec.fieldContext_CopyrightClaim_details(ctx, field)
case "createdAt":
return ec.fieldContext_CopyrightClaim_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_CopyrightClaim_updatedAt(ctx, field)
case "work":
return ec.fieldContext_CopyrightClaim_work(ctx, field)
case "translation":
return ec.fieldContext_CopyrightClaim_translation(ctx, field)
case "book":
return ec.fieldContext_CopyrightClaim_book(ctx, field)
case "source":
return ec.fieldContext_CopyrightClaim_source(ctx, field)
case "author":
return ec.fieldContext_CopyrightClaim_author(ctx, field)
case "user":
return ec.fieldContext_CopyrightClaim_user(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type CopyrightClaim", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _BookStats_id(ctx context.Context, field graphql.CollectedField, obj *model.BookStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_BookStats_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_BookStats_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "BookStats",
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) _BookStats_sales(ctx context.Context, field graphql.CollectedField, obj *model.BookStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_BookStats_sales(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Sales, 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.(int32)
fc.Result = res
return ec.marshalNInt2int32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_BookStats_sales(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "BookStats",
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) _BookStats_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.BookStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_BookStats_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_BookStats_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "BookStats",
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) _BookStats_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.BookStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_BookStats_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_BookStats_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "BookStats",
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) _BookStats_book(ctx context.Context, field graphql.CollectedField, obj *model.BookStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_BookStats_book(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Book, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Book)
fc.Result = res
return ec.marshalNBook2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBook(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_BookStats_book(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "BookStats",
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_Book_id(ctx, field)
case "name":
return ec.fieldContext_Book_name(ctx, field)
case "language":
return ec.fieldContext_Book_language(ctx, field)
case "createdAt":
return ec.fieldContext_Book_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Book_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Book_works(ctx, field)
case "stats":
return ec.fieldContext_Book_stats(ctx, field)
case "copyright":
return ec.fieldContext_Book_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Book_copyrightClaims(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Book", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Bookmark_id(ctx context.Context, field graphql.CollectedField, obj *model.Bookmark) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Bookmark_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Bookmark_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Bookmark",
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) _Bookmark_name(ctx context.Context, field graphql.CollectedField, obj *model.Bookmark) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Bookmark_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Bookmark_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Bookmark",
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) _Bookmark_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Bookmark) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Bookmark_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Bookmark_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Bookmark",
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) _Bookmark_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Bookmark) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Bookmark_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Bookmark_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Bookmark",
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) _Bookmark_user(ctx context.Context, field graphql.CollectedField, obj *model.Bookmark) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Bookmark_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Bookmark_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Bookmark",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Bookmark_work(ctx context.Context, field graphql.CollectedField, obj *model.Bookmark) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Bookmark_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Bookmark_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Bookmark",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Category_id(ctx context.Context, field graphql.CollectedField, obj *model.Category) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Category_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Category_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Category",
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) _Category_name(ctx context.Context, field graphql.CollectedField, obj *model.Category) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Category_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Category_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Category",
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) _Category_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Category) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Category_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Category_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Category",
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) _Category_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Category) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Category_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Category_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Category",
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) _Category_works(ctx context.Context, field graphql.CollectedField, obj *model.Category) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Category_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Category_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Category",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _City_id(ctx context.Context, field graphql.CollectedField, obj *model.City) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_City_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_City_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "City",
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) _City_name(ctx context.Context, field graphql.CollectedField, obj *model.City) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_City_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_City_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "City",
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) _City_language(ctx context.Context, field graphql.CollectedField, obj *model.City) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_City_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) (any, 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 {
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_City_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "City",
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) _City_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.City) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_City_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_City_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "City",
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) _City_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.City) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_City_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_City_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "City",
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) _City_country(ctx context.Context, field graphql.CollectedField, obj *model.City) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_City_country(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Country, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Country)
fc.Result = res
return ec.marshalOCountry2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCountry(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_City_country(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "City",
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_Country_id(ctx, field)
case "name":
return ec.fieldContext_Country_name(ctx, field)
case "language":
return ec.fieldContext_Country_language(ctx, field)
case "createdAt":
return ec.fieldContext_Country_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Country_updatedAt(ctx, field)
case "authors":
return ec.fieldContext_Country_authors(ctx, field)
case "users":
return ec.fieldContext_Country_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Country", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _City_authors(ctx context.Context, field graphql.CollectedField, obj *model.City) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_City_authors(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Authors, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Author)
fc.Result = res
return ec.marshalOAuthor2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_City_authors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "City",
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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _City_users(ctx context.Context, field graphql.CollectedField, obj *model.City) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_City_users(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Users, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.User)
fc.Result = res
return ec.marshalOUser2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_City_users(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "City",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Collection_id(ctx context.Context, field graphql.CollectedField, obj *model.Collection) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Collection_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Collection_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Collection",
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) _Collection_name(ctx context.Context, field graphql.CollectedField, obj *model.Collection) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Collection_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Collection_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Collection",
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) _Collection_description(ctx context.Context, field graphql.CollectedField, obj *model.Collection) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Collection_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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_Collection_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Collection",
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) _Collection_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Collection) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Collection_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Collection_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Collection",
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) _Collection_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Collection) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Collection_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Collection_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Collection",
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) _Collection_works(ctx context.Context, field graphql.CollectedField, obj *model.Collection) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Collection_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Collection_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Collection",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Collection_user(ctx context.Context, field graphql.CollectedField, obj *model.Collection) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Collection_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalOUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Collection_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Collection",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Collection_stats(ctx context.Context, field graphql.CollectedField, obj *model.Collection) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Collection_stats(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Stats, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.CollectionStats)
fc.Result = res
return ec.marshalOCollectionStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionStats(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Collection_stats(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Collection",
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_CollectionStats_id(ctx, field)
case "items":
return ec.fieldContext_CollectionStats_items(ctx, field)
case "createdAt":
return ec.fieldContext_CollectionStats_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_CollectionStats_updatedAt(ctx, field)
case "collection":
return ec.fieldContext_CollectionStats_collection(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type CollectionStats", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _CollectionStats_id(ctx context.Context, field graphql.CollectedField, obj *model.CollectionStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CollectionStats_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CollectionStats_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CollectionStats",
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) _CollectionStats_items(ctx context.Context, field graphql.CollectedField, obj *model.CollectionStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CollectionStats_items(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Items, 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.(int32)
fc.Result = res
return ec.marshalNInt2int32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CollectionStats_items(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CollectionStats",
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) _CollectionStats_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.CollectionStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CollectionStats_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_CollectionStats_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CollectionStats",
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) _CollectionStats_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.CollectionStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CollectionStats_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_CollectionStats_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CollectionStats",
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) _CollectionStats_collection(ctx context.Context, field graphql.CollectedField, obj *model.CollectionStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CollectionStats_collection(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Collection, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Collection)
fc.Result = res
return ec.marshalNCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CollectionStats_collection(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CollectionStats",
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_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Comment_id(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Comment_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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) _Comment_text(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_text(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Text, 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_Comment_text(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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) _Comment_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Comment_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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) _Comment_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Comment_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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) _Comment_user(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Comment_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Comment_work(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalOWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Comment_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Comment_translation(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_translation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translation, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Translation)
fc.Result = res
return ec.marshalOTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Comment_translation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Comment_lineNumber(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_lineNumber(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.LineNumber, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Comment_lineNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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) _Comment_parentComment(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_parentComment(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.ParentComment, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Comment)
fc.Result = res
return ec.marshalOComment2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Comment_parentComment(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Comment_childComments(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_childComments(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.ChildComments, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Comment)
fc.Result = res
return ec.marshalOComment2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Comment_childComments(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Comment_likes(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Comment_likes(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Likes, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Like)
fc.Result = res
return ec.marshalOLike2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLikeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Comment_likes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Comment",
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_Like_id(ctx, field)
case "createdAt":
return ec.fieldContext_Like_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Like_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Like_user(ctx, field)
case "work":
return ec.fieldContext_Like_work(ctx, field)
case "translation":
return ec.fieldContext_Like_translation(ctx, field)
case "comment":
return ec.fieldContext_Like_comment(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Like", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Concept_id(ctx context.Context, field graphql.CollectedField, obj *model.Concept) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Concept_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Concept_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Concept",
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) _Concept_name(ctx context.Context, field graphql.CollectedField, obj *model.Concept) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Concept_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Concept_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Concept",
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) _Concept_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Concept) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Concept_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Concept_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Concept",
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) _Concept_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Concept) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Concept_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Concept_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Concept",
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) _Concept_works(ctx context.Context, field graphql.CollectedField, obj *model.Concept) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Concept_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Concept_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Concept",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Concept_words(ctx context.Context, field graphql.CollectedField, obj *model.Concept) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Concept_words(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Words, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Word)
fc.Result = res
return ec.marshalOWord2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWordᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Concept_words(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Concept",
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_Word_id(ctx, field)
case "name":
return ec.fieldContext_Word_name(ctx, field)
case "createdAt":
return ec.fieldContext_Word_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Word_updatedAt(ctx, field)
case "concept":
return ec.fieldContext_Word_concept(ctx, field)
case "works":
return ec.fieldContext_Word_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Word", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Contribution_id(ctx context.Context, field graphql.CollectedField, obj *model.Contribution) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Contribution_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Contribution_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Contribution",
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) _Contribution_name(ctx context.Context, field graphql.CollectedField, obj *model.Contribution) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Contribution_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Contribution_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Contribution",
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) _Contribution_status(ctx context.Context, field graphql.CollectedField, obj *model.Contribution) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Contribution_status(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) (any, 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.(model.ContributionStatus)
fc.Result = res
return ec.marshalNContributionStatus2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionStatus(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Contribution_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Contribution",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type ContributionStatus does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Contribution_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Contribution) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Contribution_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Contribution_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Contribution",
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) _Contribution_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Contribution) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Contribution_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Contribution_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Contribution",
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) _Contribution_user(ctx context.Context, field graphql.CollectedField, obj *model.Contribution) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Contribution_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Contribution_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Contribution",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Contribution_work(ctx context.Context, field graphql.CollectedField, obj *model.Contribution) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Contribution_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalOWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Contribution_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Contribution",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Contribution_translation(ctx context.Context, field graphql.CollectedField, obj *model.Contribution) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Contribution_translation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translation, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Translation)
fc.Result = res
return ec.marshalOTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Contribution_translation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Contribution",
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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Copyright_id(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Copyright_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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) _Copyright_name(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Copyright_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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) _Copyright_language(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_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) (any, 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 {
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_Copyright_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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) _Copyright_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Copyright_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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) _Copyright_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Copyright_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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) _Copyright_workOwner(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_workOwner(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.WorkOwner, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Author)
fc.Result = res
return ec.marshalOAuthor2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Copyright_workOwner(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Copyright_works(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Copyright_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Copyright_translations(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_translations(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translations, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Translation)
fc.Result = res
return ec.marshalOTranslation2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Copyright_translations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Copyright_books(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_books(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Books, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Book)
fc.Result = res
return ec.marshalOBook2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Copyright_books(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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_Book_id(ctx, field)
case "name":
return ec.fieldContext_Book_name(ctx, field)
case "language":
return ec.fieldContext_Book_language(ctx, field)
case "createdAt":
return ec.fieldContext_Book_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Book_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Book_works(ctx, field)
case "stats":
return ec.fieldContext_Book_stats(ctx, field)
case "copyright":
return ec.fieldContext_Book_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Book_copyrightClaims(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Book", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Copyright_sources(ctx context.Context, field graphql.CollectedField, obj *model.Copyright) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Copyright_sources(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Sources, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Source)
fc.Result = res
return ec.marshalOSource2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSourceᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Copyright_sources(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Copyright",
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_Source_id(ctx, field)
case "name":
return ec.fieldContext_Source_name(ctx, field)
case "language":
return ec.fieldContext_Source_language(ctx, field)
case "createdAt":
return ec.fieldContext_Source_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Source_updatedAt(ctx, field)
case "copyright":
return ec.fieldContext_Source_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Source_copyrightClaims(ctx, field)
case "works":
return ec.fieldContext_Source_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Source", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _CopyrightClaim_id(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CopyrightClaim_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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) _CopyrightClaim_details(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_details(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Details, 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_CopyrightClaim_details(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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) _CopyrightClaim_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_CopyrightClaim_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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) _CopyrightClaim_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_CopyrightClaim_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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) _CopyrightClaim_work(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalOWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CopyrightClaim_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _CopyrightClaim_translation(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_translation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translation, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Translation)
fc.Result = res
return ec.marshalOTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CopyrightClaim_translation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _CopyrightClaim_book(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_book(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Book, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Book)
fc.Result = res
return ec.marshalOBook2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBook(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CopyrightClaim_book(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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_Book_id(ctx, field)
case "name":
return ec.fieldContext_Book_name(ctx, field)
case "language":
return ec.fieldContext_Book_language(ctx, field)
case "createdAt":
return ec.fieldContext_Book_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Book_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Book_works(ctx, field)
case "stats":
return ec.fieldContext_Book_stats(ctx, field)
case "copyright":
return ec.fieldContext_Book_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Book_copyrightClaims(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Book", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _CopyrightClaim_source(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_source(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Source, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Source)
fc.Result = res
return ec.marshalOSource2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSource(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CopyrightClaim_source(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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_Source_id(ctx, field)
case "name":
return ec.fieldContext_Source_name(ctx, field)
case "language":
return ec.fieldContext_Source_language(ctx, field)
case "createdAt":
return ec.fieldContext_Source_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Source_updatedAt(ctx, field)
case "copyright":
return ec.fieldContext_Source_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Source_copyrightClaims(ctx, field)
case "works":
return ec.fieldContext_Source_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Source", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _CopyrightClaim_author(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_author(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Author)
fc.Result = res
return ec.marshalOAuthor2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CopyrightClaim_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _CopyrightClaim_user(ctx context.Context, field graphql.CollectedField, obj *model.CopyrightClaim) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_CopyrightClaim_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalOUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_CopyrightClaim_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "CopyrightClaim",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Country_id(ctx context.Context, field graphql.CollectedField, obj *model.Country) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Country_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Country_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Country",
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) _Country_name(ctx context.Context, field graphql.CollectedField, obj *model.Country) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Country_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Country_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Country",
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) _Country_language(ctx context.Context, field graphql.CollectedField, obj *model.Country) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Country_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) (any, 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 {
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_Country_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Country",
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) _Country_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Country) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Country_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Country_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Country",
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) _Country_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Country) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Country_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Country_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Country",
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) _Country_authors(ctx context.Context, field graphql.CollectedField, obj *model.Country) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Country_authors(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Authors, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Author)
fc.Result = res
return ec.marshalOAuthor2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Country_authors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Country",
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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Country_users(ctx context.Context, field graphql.CollectedField, obj *model.Country) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Country_users(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Users, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.User)
fc.Result = res
return ec.marshalOUser2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Country_users(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Country",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Edge_id(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Edge_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
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) _Edge_sourceTable(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_sourceTable(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.SourceTable, 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_Edge_sourceTable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
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) _Edge_sourceId(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_sourceId(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.SourceID, 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.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Edge_sourceId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
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) _Edge_targetTable(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_targetTable(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.TargetTable, 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_Edge_targetTable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
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) _Edge_targetId(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_targetId(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.TargetID, 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.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Edge_targetId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
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) _Edge_relation(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_relation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Relation, 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_Edge_relation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
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) _Edge_language(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_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) (any, 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.(*string)
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Edge_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
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) _Edge_extra(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_extra(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Extra, 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.marshalOJSON2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Edge_extra(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type JSON does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Edge_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Edge_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
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) _Edge_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Edge) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Edge_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Edge_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Edge",
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) _Emotion_id(ctx context.Context, field graphql.CollectedField, obj *model.Emotion) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Emotion_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Emotion_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Emotion",
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) _Emotion_name(ctx context.Context, field graphql.CollectedField, obj *model.Emotion) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Emotion_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Emotion_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Emotion",
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) _Emotion_language(ctx context.Context, field graphql.CollectedField, obj *model.Emotion) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Emotion_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) (any, 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 {
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_Emotion_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Emotion",
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) _Emotion_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Emotion) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Emotion_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Emotion_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Emotion",
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) _Emotion_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Emotion) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Emotion_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Emotion_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Emotion",
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) _Emotion_user(ctx context.Context, field graphql.CollectedField, obj *model.Emotion) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Emotion_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalOUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Emotion_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Emotion",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Emotion_work(ctx context.Context, field graphql.CollectedField, obj *model.Emotion) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Emotion_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalOWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Emotion_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Emotion",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Emotion_collection(ctx context.Context, field graphql.CollectedField, obj *model.Emotion) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Emotion_collection(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Collection, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Collection)
fc.Result = res
return ec.marshalOCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Emotion_collection(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Emotion",
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_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Like_id(ctx context.Context, field graphql.CollectedField, obj *model.Like) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Like_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Like_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Like",
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) _Like_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Like) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Like_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Like_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Like",
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) _Like_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Like) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Like_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Like_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Like",
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) _Like_user(ctx context.Context, field graphql.CollectedField, obj *model.Like) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Like_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Like_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Like",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Like_work(ctx context.Context, field graphql.CollectedField, obj *model.Like) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Like_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalOWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Like_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Like",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Like_translation(ctx context.Context, field graphql.CollectedField, obj *model.Like) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Like_translation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translation, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Translation)
fc.Result = res
return ec.marshalOTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Like_translation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Like",
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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Like_comment(ctx context.Context, field graphql.CollectedField, obj *model.Like) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Like_comment(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Comment, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Comment)
fc.Result = res
return ec.marshalOComment2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Like_comment(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Like",
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_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _LinguisticLayer_id(ctx context.Context, field graphql.CollectedField, obj *model.LinguisticLayer) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_LinguisticLayer_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_LinguisticLayer_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "LinguisticLayer",
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) _LinguisticLayer_name(ctx context.Context, field graphql.CollectedField, obj *model.LinguisticLayer) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_LinguisticLayer_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_LinguisticLayer_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "LinguisticLayer",
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) _LinguisticLayer_language(ctx context.Context, field graphql.CollectedField, obj *model.LinguisticLayer) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_LinguisticLayer_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) (any, 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 {
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_LinguisticLayer_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "LinguisticLayer",
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) _LinguisticLayer_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.LinguisticLayer) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_LinguisticLayer_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_LinguisticLayer_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "LinguisticLayer",
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) _LinguisticLayer_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.LinguisticLayer) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_LinguisticLayer_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_LinguisticLayer_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "LinguisticLayer",
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) _LinguisticLayer_works(ctx context.Context, field graphql.CollectedField, obj *model.LinguisticLayer) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_LinguisticLayer_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_LinguisticLayer_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "LinguisticLayer",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Mood_id(ctx context.Context, field graphql.CollectedField, obj *model.Mood) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mood_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mood_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mood",
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) _Mood_name(ctx context.Context, field graphql.CollectedField, obj *model.Mood) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mood_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mood_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mood",
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) _Mood_language(ctx context.Context, field graphql.CollectedField, obj *model.Mood) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mood_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) (any, 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 {
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_Mood_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mood",
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) _Mood_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Mood) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mood_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Mood_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mood",
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) _Mood_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Mood) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mood_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Mood_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mood",
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) _Mood_works(ctx context.Context, field graphql.CollectedField, obj *model.Mood) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mood_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mood_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Mood",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Mutation_register(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_register(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().Register(rctx, fc.Args["input"].(model.RegisterInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.AuthPayload)
fc.Result = res
return ec.marshalNAuthPayload2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthPayload(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_register(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 "token":
return ec.fieldContext_AuthPayload_token(ctx, field)
case "user":
return ec.fieldContext_AuthPayload_user(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type AuthPayload", 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_register_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_login(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_login(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().Login(rctx, fc.Args["input"].(model.LoginInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.AuthPayload)
fc.Result = res
return ec.marshalNAuthPayload2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthPayload(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_login(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 "token":
return ec.fieldContext_AuthPayload_token(ctx, field)
case "user":
return ec.fieldContext_AuthPayload_user(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type AuthPayload", 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_login_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_createWork(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_createWork(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CreateWork(rctx, fc.Args["input"].(model.WorkInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_createWork(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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", 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_createWork_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_updateWork(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_updateWork(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().UpdateWork(rctx, fc.Args["id"].(string), fc.Args["input"].(model.WorkInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_updateWork(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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", 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_updateWork_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteWork(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteWork(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().DeleteWork(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_deleteWork(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 Boolean 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_deleteWork_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_createTranslation(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_createTranslation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CreateTranslation(rctx, fc.Args["input"].(model.TranslationInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Translation)
fc.Result = res
return ec.marshalNTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_createTranslation(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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", 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_createTranslation_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_updateTranslation(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_updateTranslation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().UpdateTranslation(rctx, fc.Args["id"].(string), fc.Args["input"].(model.TranslationInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Translation)
fc.Result = res
return ec.marshalNTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_updateTranslation(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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", 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_updateTranslation_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteTranslation(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteTranslation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().DeleteTranslation(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_deleteTranslation(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 Boolean 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_deleteTranslation_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_createAuthor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_createAuthor(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CreateAuthor(rctx, fc.Args["input"].(model.AuthorInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Author)
fc.Result = res
return ec.marshalNAuthor2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_createAuthor(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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", 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_createAuthor_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_updateAuthor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_updateAuthor(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().UpdateAuthor(rctx, fc.Args["id"].(string), fc.Args["input"].(model.AuthorInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Author)
fc.Result = res
return ec.marshalNAuthor2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_updateAuthor(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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", 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_updateAuthor_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteAuthor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteAuthor(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().DeleteAuthor(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_deleteAuthor(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 Boolean 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_deleteAuthor_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().UpdateUser(rctx, fc.Args["id"].(string), fc.Args["input"].(model.UserInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(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_updateUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
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 {
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().DeleteUser(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
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) {
return nil, errors.New("field of type Boolean 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_deleteUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_createCollection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_createCollection(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CreateCollection(rctx, fc.Args["input"].(model.CollectionInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Collection)
fc.Result = res
return ec.marshalNCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_createCollection(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_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", 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_createCollection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_updateCollection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_updateCollection(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().UpdateCollection(rctx, fc.Args["id"].(string), fc.Args["input"].(model.CollectionInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Collection)
fc.Result = res
return ec.marshalNCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_updateCollection(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_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", 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_updateCollection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteCollection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteCollection(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().DeleteCollection(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_deleteCollection(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 Boolean 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_deleteCollection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_addWorkToCollection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_addWorkToCollection(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().AddWorkToCollection(rctx, fc.Args["collectionId"].(string), fc.Args["workId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Collection)
fc.Result = res
return ec.marshalNCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_addWorkToCollection(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_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", 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_addWorkToCollection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_removeWorkFromCollection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_removeWorkFromCollection(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().RemoveWorkFromCollection(rctx, fc.Args["collectionId"].(string), fc.Args["workId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Collection)
fc.Result = res
return ec.marshalNCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_removeWorkFromCollection(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_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", 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_removeWorkFromCollection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_createComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_createComment(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CreateComment(rctx, fc.Args["input"].(model.CommentInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Comment)
fc.Result = res
return ec.marshalNComment2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_createComment(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_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", 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_createComment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_updateComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_updateComment(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().UpdateComment(rctx, fc.Args["id"].(string), fc.Args["input"].(model.CommentInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Comment)
fc.Result = res
return ec.marshalNComment2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_updateComment(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_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", 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_updateComment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteComment(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().DeleteComment(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_deleteComment(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 Boolean 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_deleteComment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_createLike(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_createLike(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CreateLike(rctx, fc.Args["input"].(model.LikeInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Like)
fc.Result = res
return ec.marshalNLike2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLike(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_createLike(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_Like_id(ctx, field)
case "createdAt":
return ec.fieldContext_Like_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Like_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Like_user(ctx, field)
case "work":
return ec.fieldContext_Like_work(ctx, field)
case "translation":
return ec.fieldContext_Like_translation(ctx, field)
case "comment":
return ec.fieldContext_Like_comment(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Like", 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_createLike_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteLike(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteLike(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().DeleteLike(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_deleteLike(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 Boolean 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_deleteLike_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_createBookmark(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_createBookmark(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CreateBookmark(rctx, fc.Args["input"].(model.BookmarkInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Bookmark)
fc.Result = res
return ec.marshalNBookmark2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookmark(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_createBookmark(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_Bookmark_id(ctx, field)
case "name":
return ec.fieldContext_Bookmark_name(ctx, field)
case "createdAt":
return ec.fieldContext_Bookmark_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Bookmark_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Bookmark_user(ctx, field)
case "work":
return ec.fieldContext_Bookmark_work(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Bookmark", 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_createBookmark_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteBookmark(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteBookmark(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().DeleteBookmark(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_deleteBookmark(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 Boolean 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_deleteBookmark_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_createContribution(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_createContribution(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CreateContribution(rctx, fc.Args["input"].(model.ContributionInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Contribution)
fc.Result = res
return ec.marshalNContribution2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContribution(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_createContribution(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_Contribution_id(ctx, field)
case "name":
return ec.fieldContext_Contribution_name(ctx, field)
case "status":
return ec.fieldContext_Contribution_status(ctx, field)
case "createdAt":
return ec.fieldContext_Contribution_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Contribution_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Contribution_user(ctx, field)
case "work":
return ec.fieldContext_Contribution_work(ctx, field)
case "translation":
return ec.fieldContext_Contribution_translation(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Contribution", 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_createContribution_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_updateContribution(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_updateContribution(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().UpdateContribution(rctx, fc.Args["id"].(string), fc.Args["input"].(model.ContributionInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Contribution)
fc.Result = res
return ec.marshalNContribution2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContribution(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_updateContribution(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_Contribution_id(ctx, field)
case "name":
return ec.fieldContext_Contribution_name(ctx, field)
case "status":
return ec.fieldContext_Contribution_status(ctx, field)
case "createdAt":
return ec.fieldContext_Contribution_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Contribution_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Contribution_user(ctx, field)
case "work":
return ec.fieldContext_Contribution_work(ctx, field)
case "translation":
return ec.fieldContext_Contribution_translation(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Contribution", 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_updateContribution_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_deleteContribution(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_deleteContribution(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().DeleteContribution(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_deleteContribution(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 Boolean 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_deleteContribution_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_reviewContribution(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_reviewContribution(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().ReviewContribution(rctx, fc.Args["id"].(string), fc.Args["status"].(model.ContributionStatus), fc.Args["feedback"].(*string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Contribution)
fc.Result = res
return ec.marshalNContribution2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContribution(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_reviewContribution(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_Contribution_id(ctx, field)
case "name":
return ec.fieldContext_Contribution_name(ctx, field)
case "status":
return ec.fieldContext_Contribution_status(ctx, field)
case "createdAt":
return ec.fieldContext_Contribution_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Contribution_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Contribution_user(ctx, field)
case "work":
return ec.fieldContext_Contribution_work(ctx, field)
case "translation":
return ec.fieldContext_Contribution_translation(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Contribution", 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_reviewContribution_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_logout(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_logout(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().Logout(rctx)
})
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_Mutation_logout(_ 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 Boolean does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Mutation_refreshToken(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_refreshToken(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().RefreshToken(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.AuthPayload)
fc.Result = res
return ec.marshalNAuthPayload2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthPayload(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_refreshToken(_ 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 "token":
return ec.fieldContext_AuthPayload_token(ctx, field)
case "user":
return ec.fieldContext_AuthPayload_user(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type AuthPayload", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Mutation_forgotPassword(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_forgotPassword(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().ForgotPassword(rctx, fc.Args["email"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_forgotPassword(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 Boolean 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_forgotPassword_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_resetPassword(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_resetPassword(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().ResetPassword(rctx, fc.Args["token"].(string), fc.Args["newPassword"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_resetPassword(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 Boolean 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_resetPassword_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_verifyEmail(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_verifyEmail(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().VerifyEmail(rctx, fc.Args["token"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_verifyEmail(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 Boolean 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_verifyEmail_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_resendVerificationEmail(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_resendVerificationEmail(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().ResendVerificationEmail(rctx, fc.Args["email"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_resendVerificationEmail(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 Boolean 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_resendVerificationEmail_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_updateProfile(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_updateProfile(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().UpdateProfile(rctx, fc.Args["input"].(model.UserInput))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_updateProfile(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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(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_updateProfile_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Mutation_changePassword(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_changePassword(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().ChangePassword(rctx, fc.Args["currentPassword"].(string), fc.Args["newPassword"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Mutation_changePassword(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 Boolean 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_changePassword_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Place_id(ctx context.Context, field graphql.CollectedField, obj *model.Place) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Place_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Place_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Place",
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) _Place_name(ctx context.Context, field graphql.CollectedField, obj *model.Place) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Place_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Place_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Place",
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) _Place_language(ctx context.Context, field graphql.CollectedField, obj *model.Place) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Place_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) (any, 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 {
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_Place_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Place",
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) _Place_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Place) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Place_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Place_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Place",
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) _Place_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Place) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Place_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Place_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Place",
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) _Place_city(ctx context.Context, field graphql.CollectedField, obj *model.Place) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Place_city(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.City, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.City)
fc.Result = res
return ec.marshalOCity2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCity(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Place_city(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Place",
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_City_id(ctx, field)
case "name":
return ec.fieldContext_City_name(ctx, field)
case "language":
return ec.fieldContext_City_language(ctx, field)
case "createdAt":
return ec.fieldContext_City_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_City_updatedAt(ctx, field)
case "country":
return ec.fieldContext_City_country(ctx, field)
case "authors":
return ec.fieldContext_City_authors(ctx, field)
case "users":
return ec.fieldContext_City_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type City", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Place_country(ctx context.Context, field graphql.CollectedField, obj *model.Place) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Place_country(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Country, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Country)
fc.Result = res
return ec.marshalOCountry2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCountry(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Place_country(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Place",
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_Country_id(ctx, field)
case "name":
return ec.fieldContext_Country_name(ctx, field)
case "language":
return ec.fieldContext_Country_language(ctx, field)
case "createdAt":
return ec.fieldContext_Country_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Country_updatedAt(ctx, field)
case "authors":
return ec.fieldContext_Country_authors(ctx, field)
case "users":
return ec.fieldContext_Country_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Country", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Place_authors(ctx context.Context, field graphql.CollectedField, obj *model.Place) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Place_authors(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Authors, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Author)
fc.Result = res
return ec.marshalOAuthor2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Place_authors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Place",
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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _PoeticAnalysis_id(ctx context.Context, field graphql.CollectedField, obj *model.PoeticAnalysis) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PoeticAnalysis_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_PoeticAnalysis_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "PoeticAnalysis",
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) _PoeticAnalysis_structure(ctx context.Context, field graphql.CollectedField, obj *model.PoeticAnalysis) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PoeticAnalysis_structure(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Structure, 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_PoeticAnalysis_structure(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "PoeticAnalysis",
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) _PoeticAnalysis_language(ctx context.Context, field graphql.CollectedField, obj *model.PoeticAnalysis) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PoeticAnalysis_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) (any, 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 {
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_PoeticAnalysis_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "PoeticAnalysis",
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) _PoeticAnalysis_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.PoeticAnalysis) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PoeticAnalysis_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_PoeticAnalysis_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "PoeticAnalysis",
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) _PoeticAnalysis_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.PoeticAnalysis) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PoeticAnalysis_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_PoeticAnalysis_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "PoeticAnalysis",
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) _PoeticAnalysis_work(ctx context.Context, field graphql.CollectedField, obj *model.PoeticAnalysis) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PoeticAnalysis_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_PoeticAnalysis_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "PoeticAnalysis",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Query_work(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Work(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalOWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_work(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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", 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_work_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_works(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Works(rctx, fc.Args["limit"].(*int32), fc.Args["offset"].(*int32), fc.Args["language"].(*string), fc.Args["authorId"].(*string), fc.Args["categoryId"].(*string), fc.Args["tagId"].(*string), fc.Args["search"].(*string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalNWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_works(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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", 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_works_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_translation(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_translation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Translation(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Translation)
fc.Result = res
return ec.marshalOTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_translation(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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", 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_translation_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_translations(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_translations(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Translations(rctx, fc.Args["workId"].(string), fc.Args["language"].(*string), fc.Args["limit"].(*int32), fc.Args["offset"].(*int32))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Translation)
fc.Result = res
return ec.marshalNTranslation2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_translations(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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", 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_translations_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_author(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_author(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Author(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Author)
fc.Result = res
return ec.marshalOAuthor2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_author(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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", 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_author_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_authors(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_authors(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Authors(rctx, fc.Args["limit"].(*int32), fc.Args["offset"].(*int32), fc.Args["search"].(*string), fc.Args["countryId"].(*string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Author)
fc.Result = res
return ec.marshalNAuthor2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_authors(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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", 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_authors_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().User(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalOUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐ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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(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_userByEmail(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_userByEmail(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().UserByEmail(rctx, fc.Args["email"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalOUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_userByEmail(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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(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_userByEmail_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_userByUsername(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_userByUsername(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().UserByUsername(rctx, fc.Args["username"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalOUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_userByUsername(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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(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_userByUsername_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_users(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_users(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Users(rctx, fc.Args["limit"].(*int32), fc.Args["offset"].(*int32), fc.Args["role"].(*model.UserRole))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.User)
fc.Result = res
return ec.marshalNUser2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_users(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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(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_users_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_me(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_me(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Me(rctx)
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalOUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_me(_ 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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Query_userProfile(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_userProfile(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().UserProfile(rctx, fc.Args["userId"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.UserProfile)
fc.Result = res
return ec.marshalOUserProfile2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserProfile(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_userProfile(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_UserProfile_id(ctx, field)
case "userId":
return ec.fieldContext_UserProfile_userId(ctx, field)
case "user":
return ec.fieldContext_UserProfile_user(ctx, field)
case "phoneNumber":
return ec.fieldContext_UserProfile_phoneNumber(ctx, field)
case "website":
return ec.fieldContext_UserProfile_website(ctx, field)
case "twitter":
return ec.fieldContext_UserProfile_twitter(ctx, field)
case "facebook":
return ec.fieldContext_UserProfile_facebook(ctx, field)
case "linkedIn":
return ec.fieldContext_UserProfile_linkedIn(ctx, field)
case "github":
return ec.fieldContext_UserProfile_github(ctx, field)
case "preferences":
return ec.fieldContext_UserProfile_preferences(ctx, field)
case "settings":
return ec.fieldContext_UserProfile_settings(ctx, field)
case "createdAt":
return ec.fieldContext_UserProfile_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_UserProfile_updatedAt(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type UserProfile", 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_userProfile_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_collection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_collection(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Collection(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Collection)
fc.Result = res
return ec.marshalOCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_collection(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_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", 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_collection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_collections(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_collections(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Collections(rctx, fc.Args["userId"].(*string), fc.Args["limit"].(*int32), fc.Args["offset"].(*int32))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Collection)
fc.Result = res
return ec.marshalNCollection2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_collections(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_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", 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_collections_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_tag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_tag(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Tag(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Tag)
fc.Result = res
return ec.marshalOTag2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTag(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_tag(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_Tag_id(ctx, field)
case "name":
return ec.fieldContext_Tag_name(ctx, field)
case "createdAt":
return ec.fieldContext_Tag_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Tag_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Tag_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Tag", 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_tag_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_tags(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Tags(rctx, fc.Args["limit"].(*int32), fc.Args["offset"].(*int32))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Tag)
fc.Result = res
return ec.marshalNTag2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTagᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_tags(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_Tag_id(ctx, field)
case "name":
return ec.fieldContext_Tag_name(ctx, field)
case "createdAt":
return ec.fieldContext_Tag_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Tag_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Tag_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Tag", 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_tags_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_category(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_category(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Category(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Category)
fc.Result = res
return ec.marshalOCategory2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCategory(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_category(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_Category_id(ctx, field)
case "name":
return ec.fieldContext_Category_name(ctx, field)
case "createdAt":
return ec.fieldContext_Category_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Category_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Category_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Category", 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_category_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_categories(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_categories(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Categories(rctx, fc.Args["limit"].(*int32), fc.Args["offset"].(*int32))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Category)
fc.Result = res
return ec.marshalNCategory2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCategoryᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_categories(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_Category_id(ctx, field)
case "name":
return ec.fieldContext_Category_name(ctx, field)
case "createdAt":
return ec.fieldContext_Category_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Category_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Category_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Category", 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_categories_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_comment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_comment(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Comment(rctx, fc.Args["id"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Comment)
fc.Result = res
return ec.marshalOComment2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_comment(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_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", 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_comment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_comments(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_comments(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Comments(rctx, fc.Args["workId"].(*string), fc.Args["translationId"].(*string), fc.Args["userId"].(*string), fc.Args["limit"].(*int32), fc.Args["offset"].(*int32))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Comment)
fc.Result = res
return ec.marshalNComment2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_comments(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_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", 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_comments_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
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 {
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Search(rctx, fc.Args["query"].(string), fc.Args["limit"].(*int32), fc.Args["offset"].(*int32), fc.Args["filters"].(*model.SearchFilters))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.SearchResults)
fc.Result = res
return ec.marshalNSearchResults2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSearchResults(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_search(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 "works":
return ec.fieldContext_SearchResults_works(ctx, field)
case "translations":
return ec.fieldContext_SearchResults_translations(ctx, field)
case "authors":
return ec.fieldContext_SearchResults_authors(ctx, field)
case "total":
return ec.fieldContext_SearchResults_total(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type SearchResults", 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_search_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
func (ec *executionContext) _Query_trendingWorks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_trendingWorks(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().TrendingWorks(rctx, fc.Args["timePeriod"].(*string), fc.Args["limit"].(*int32))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalNWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query_trendingWorks(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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", 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_trendingWorks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.introspectType(fc.Args["name"].(string))
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", 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___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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return ec.introspectSchema()
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*introspection.Schema)
fc.Result = res
return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Query___schema(_ 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
}
func (ec *executionContext) _ReadabilityScore_id(ctx context.Context, field graphql.CollectedField, obj *model.ReadabilityScore) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ReadabilityScore_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_ReadabilityScore_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ReadabilityScore",
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) _ReadabilityScore_score(ctx context.Context, field graphql.CollectedField, obj *model.ReadabilityScore) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ReadabilityScore_score(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Score, 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_ReadabilityScore_score(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ReadabilityScore",
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) _ReadabilityScore_language(ctx context.Context, field graphql.CollectedField, obj *model.ReadabilityScore) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ReadabilityScore_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) (any, 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 {
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_ReadabilityScore_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ReadabilityScore",
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) _ReadabilityScore_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.ReadabilityScore) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ReadabilityScore_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_ReadabilityScore_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ReadabilityScore",
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) _ReadabilityScore_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.ReadabilityScore) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ReadabilityScore_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_ReadabilityScore_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ReadabilityScore",
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) _ReadabilityScore_work(ctx context.Context, field graphql.CollectedField, obj *model.ReadabilityScore) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ReadabilityScore_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalOWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_ReadabilityScore_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ReadabilityScore",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _SearchResults_works(ctx context.Context, field graphql.CollectedField, obj *model.SearchResults) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SearchResults_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalNWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SearchResults_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SearchResults",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _SearchResults_translations(ctx context.Context, field graphql.CollectedField, obj *model.SearchResults) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SearchResults_translations(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translations, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Translation)
fc.Result = res
return ec.marshalNTranslation2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SearchResults_translations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SearchResults",
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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _SearchResults_authors(ctx context.Context, field graphql.CollectedField, obj *model.SearchResults) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SearchResults_authors(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Authors, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]*model.Author)
fc.Result = res
return ec.marshalNAuthor2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SearchResults_authors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SearchResults",
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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _SearchResults_total(ctx context.Context, field graphql.CollectedField, obj *model.SearchResults) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SearchResults_total(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Total, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(int32)
fc.Result = res
return ec.marshalNInt2int32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SearchResults_total(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SearchResults",
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) _Source_id(ctx context.Context, field graphql.CollectedField, obj *model.Source) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Source_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Source_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Source",
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) _Source_name(ctx context.Context, field graphql.CollectedField, obj *model.Source) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Source_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Source_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Source",
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) _Source_language(ctx context.Context, field graphql.CollectedField, obj *model.Source) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Source_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) (any, 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 {
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_Source_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Source",
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) _Source_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Source) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Source_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Source_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Source",
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) _Source_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Source) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Source_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Source_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Source",
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) _Source_copyright(ctx context.Context, field graphql.CollectedField, obj *model.Source) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Source_copyright(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Copyright, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Copyright)
fc.Result = res
return ec.marshalOCopyright2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyright(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Source_copyright(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Source",
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_Copyright_id(ctx, field)
case "name":
return ec.fieldContext_Copyright_name(ctx, field)
case "language":
return ec.fieldContext_Copyright_language(ctx, field)
case "createdAt":
return ec.fieldContext_Copyright_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Copyright_updatedAt(ctx, field)
case "workOwner":
return ec.fieldContext_Copyright_workOwner(ctx, field)
case "works":
return ec.fieldContext_Copyright_works(ctx, field)
case "translations":
return ec.fieldContext_Copyright_translations(ctx, field)
case "books":
return ec.fieldContext_Copyright_books(ctx, field)
case "sources":
return ec.fieldContext_Copyright_sources(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Copyright", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Source_copyrightClaims(ctx context.Context, field graphql.CollectedField, obj *model.Source) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Source_copyrightClaims(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CopyrightClaims, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.CopyrightClaim)
fc.Result = res
return ec.marshalOCopyrightClaim2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyrightClaimᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Source_copyrightClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Source",
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_CopyrightClaim_id(ctx, field)
case "details":
return ec.fieldContext_CopyrightClaim_details(ctx, field)
case "createdAt":
return ec.fieldContext_CopyrightClaim_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_CopyrightClaim_updatedAt(ctx, field)
case "work":
return ec.fieldContext_CopyrightClaim_work(ctx, field)
case "translation":
return ec.fieldContext_CopyrightClaim_translation(ctx, field)
case "book":
return ec.fieldContext_CopyrightClaim_book(ctx, field)
case "source":
return ec.fieldContext_CopyrightClaim_source(ctx, field)
case "author":
return ec.fieldContext_CopyrightClaim_author(ctx, field)
case "user":
return ec.fieldContext_CopyrightClaim_user(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type CopyrightClaim", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Source_works(ctx context.Context, field graphql.CollectedField, obj *model.Source) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Source_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Source_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Source",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Tag_id(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Tag_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Tag_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Tag",
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) _Tag_name(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Tag_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Tag_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Tag",
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) _Tag_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Tag_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Tag_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Tag",
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) _Tag_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Tag_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Tag_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Tag",
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) _Tag_works(ctx context.Context, field graphql.CollectedField, obj *model.Tag) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Tag_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Tag_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Tag",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _TextMetadata_id(ctx context.Context, field graphql.CollectedField, obj *model.TextMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TextMetadata_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TextMetadata_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TextMetadata",
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) _TextMetadata_analysis(ctx context.Context, field graphql.CollectedField, obj *model.TextMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TextMetadata_analysis(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Analysis, 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_TextMetadata_analysis(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TextMetadata",
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) _TextMetadata_language(ctx context.Context, field graphql.CollectedField, obj *model.TextMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TextMetadata_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) (any, 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 {
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_TextMetadata_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TextMetadata",
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) _TextMetadata_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.TextMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TextMetadata_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_TextMetadata_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TextMetadata",
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) _TextMetadata_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.TextMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TextMetadata_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_TextMetadata_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TextMetadata",
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) _TextMetadata_work(ctx context.Context, field graphql.CollectedField, obj *model.TextMetadata) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TextMetadata_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TextMetadata_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TextMetadata",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _TopicCluster_id(ctx context.Context, field graphql.CollectedField, obj *model.TopicCluster) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TopicCluster_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TopicCluster_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TopicCluster",
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) _TopicCluster_name(ctx context.Context, field graphql.CollectedField, obj *model.TopicCluster) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TopicCluster_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TopicCluster_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TopicCluster",
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) _TopicCluster_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.TopicCluster) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TopicCluster_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_TopicCluster_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TopicCluster",
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) _TopicCluster_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.TopicCluster) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TopicCluster_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_TopicCluster_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TopicCluster",
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) _TopicCluster_works(ctx context.Context, field graphql.CollectedField, obj *model.TopicCluster) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TopicCluster_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TopicCluster_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TopicCluster",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Translation_id(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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) _Translation_name(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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) _Translation_language(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_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) (any, 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 {
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_Translation_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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) _Translation_content(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Content, 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_Translation_content(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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) _Translation_workId(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_workId(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.WorkID, 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.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_workId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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) _Translation_work(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Translation_translator(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_translator(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translator, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalOUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_translator(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Translation_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Translation_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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) _Translation_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Translation_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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) _Translation_stats(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_stats(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Stats, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.TranslationStats)
fc.Result = res
return ec.marshalOTranslationStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationStats(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_stats(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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_TranslationStats_id(ctx, field)
case "views":
return ec.fieldContext_TranslationStats_views(ctx, field)
case "likes":
return ec.fieldContext_TranslationStats_likes(ctx, field)
case "comments":
return ec.fieldContext_TranslationStats_comments(ctx, field)
case "shares":
return ec.fieldContext_TranslationStats_shares(ctx, field)
case "readingTime":
return ec.fieldContext_TranslationStats_readingTime(ctx, field)
case "sentiment":
return ec.fieldContext_TranslationStats_sentiment(ctx, field)
case "createdAt":
return ec.fieldContext_TranslationStats_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_TranslationStats_updatedAt(ctx, field)
case "translation":
return ec.fieldContext_TranslationStats_translation(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type TranslationStats", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Translation_copyright(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_copyright(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Copyright, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Copyright)
fc.Result = res
return ec.marshalOCopyright2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyright(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_copyright(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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_Copyright_id(ctx, field)
case "name":
return ec.fieldContext_Copyright_name(ctx, field)
case "language":
return ec.fieldContext_Copyright_language(ctx, field)
case "createdAt":
return ec.fieldContext_Copyright_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Copyright_updatedAt(ctx, field)
case "workOwner":
return ec.fieldContext_Copyright_workOwner(ctx, field)
case "works":
return ec.fieldContext_Copyright_works(ctx, field)
case "translations":
return ec.fieldContext_Copyright_translations(ctx, field)
case "books":
return ec.fieldContext_Copyright_books(ctx, field)
case "sources":
return ec.fieldContext_Copyright_sources(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Copyright", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Translation_copyrightClaims(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_copyrightClaims(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CopyrightClaims, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.CopyrightClaim)
fc.Result = res
return ec.marshalOCopyrightClaim2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyrightClaimᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_copyrightClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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_CopyrightClaim_id(ctx, field)
case "details":
return ec.fieldContext_CopyrightClaim_details(ctx, field)
case "createdAt":
return ec.fieldContext_CopyrightClaim_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_CopyrightClaim_updatedAt(ctx, field)
case "work":
return ec.fieldContext_CopyrightClaim_work(ctx, field)
case "translation":
return ec.fieldContext_CopyrightClaim_translation(ctx, field)
case "book":
return ec.fieldContext_CopyrightClaim_book(ctx, field)
case "source":
return ec.fieldContext_CopyrightClaim_source(ctx, field)
case "author":
return ec.fieldContext_CopyrightClaim_author(ctx, field)
case "user":
return ec.fieldContext_CopyrightClaim_user(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type CopyrightClaim", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Translation_comments(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_comments(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Comments, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Comment)
fc.Result = res
return ec.marshalOComment2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_comments(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Translation_likes(ctx context.Context, field graphql.CollectedField, obj *model.Translation) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Translation_likes(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Likes, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Like)
fc.Result = res
return ec.marshalOLike2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLikeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Translation_likes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Translation",
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_Like_id(ctx, field)
case "createdAt":
return ec.fieldContext_Like_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Like_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Like_user(ctx, field)
case "work":
return ec.fieldContext_Like_work(ctx, field)
case "translation":
return ec.fieldContext_Like_translation(ctx, field)
case "comment":
return ec.fieldContext_Like_comment(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Like", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _TranslationStats_id(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TranslationStats_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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) _TranslationStats_views(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_views(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Views, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TranslationStats_views(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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) _TranslationStats_likes(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_likes(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Likes, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TranslationStats_likes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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) _TranslationStats_comments(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_comments(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Comments, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TranslationStats_comments(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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) _TranslationStats_shares(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_shares(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Shares, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TranslationStats_shares(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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) _TranslationStats_readingTime(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_readingTime(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.ReadingTime, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TranslationStats_readingTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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) _TranslationStats_sentiment(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_sentiment(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Sentiment, 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_TranslationStats_sentiment(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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) _TranslationStats_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_TranslationStats_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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) _TranslationStats_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_TranslationStats_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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) _TranslationStats_translation(ctx context.Context, field graphql.CollectedField, obj *model.TranslationStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TranslationStats_translation(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translation, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Translation)
fc.Result = res
return ec.marshalNTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_TranslationStats_translation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "TranslationStats",
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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_id(_ 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")
},
}
return fc, nil
}
func (ec *executionContext) _User_username(ctx context.Context, field graphql.CollectedField, obj *model.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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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) {
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_User_username(_ 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_email(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_email(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Email, 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_User_email(_ 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_firstName(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_firstName(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.FirstName, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_firstName(_ 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_lastName(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_lastName(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.LastName, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_lastName(_ 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_displayName(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_displayName(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.DisplayName, 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_User_displayName(_ 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_bio(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_bio(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bio, 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_User_bio(_ 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_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_avatarUrl(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.AvatarURL, 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_User_avatarUrl(_ 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_role(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_role(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Role, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(model.UserRole)
fc.Result = res
return ec.marshalNUserRole2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserRole(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_role(_ 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 UserRole does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _User_lastLoginAt(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_lastLoginAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.LastLoginAt, 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_User_lastLoginAt(_ 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_verified(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_verified(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Verified, 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_User_verified(_ 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) _User_active(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_active(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Active, 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_User_active(_ 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) _User_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_User_createdAt(_ 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_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_User_updatedAt(_ 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_translations(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_translations(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translations, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Translation)
fc.Result = res
return ec.marshalOTranslation2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_translations(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_comments(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_comments(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Comments, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Comment)
fc.Result = res
return ec.marshalOComment2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_comments(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_likes(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_likes(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Likes, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Like)
fc.Result = res
return ec.marshalOLike2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLikeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_likes(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_Like_id(ctx, field)
case "createdAt":
return ec.fieldContext_Like_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Like_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Like_user(ctx, field)
case "work":
return ec.fieldContext_Like_work(ctx, field)
case "translation":
return ec.fieldContext_Like_translation(ctx, field)
case "comment":
return ec.fieldContext_Like_comment(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Like", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_bookmarks(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_bookmarks(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bookmarks, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Bookmark)
fc.Result = res
return ec.marshalOBookmark2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookmarkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_bookmarks(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_Bookmark_id(ctx, field)
case "name":
return ec.fieldContext_Bookmark_name(ctx, field)
case "createdAt":
return ec.fieldContext_Bookmark_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Bookmark_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Bookmark_user(ctx, field)
case "work":
return ec.fieldContext_Bookmark_work(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Bookmark", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_collections(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_collections(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Collections, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Collection)
fc.Result = res
return ec.marshalOCollection2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_collections(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_contributions(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_contributions(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Contributions, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Contribution)
fc.Result = res
return ec.marshalOContribution2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_contributions(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_Contribution_id(ctx, field)
case "name":
return ec.fieldContext_Contribution_name(ctx, field)
case "status":
return ec.fieldContext_Contribution_status(ctx, field)
case "createdAt":
return ec.fieldContext_Contribution_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Contribution_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Contribution_user(ctx, field)
case "work":
return ec.fieldContext_Contribution_work(ctx, field)
case "translation":
return ec.fieldContext_Contribution_translation(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Contribution", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_country(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_country(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Country, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Country)
fc.Result = res
return ec.marshalOCountry2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCountry(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_country(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_Country_id(ctx, field)
case "name":
return ec.fieldContext_Country_name(ctx, field)
case "language":
return ec.fieldContext_Country_language(ctx, field)
case "createdAt":
return ec.fieldContext_Country_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Country_updatedAt(ctx, field)
case "authors":
return ec.fieldContext_Country_authors(ctx, field)
case "users":
return ec.fieldContext_Country_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Country", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_city(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_city(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.City, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.City)
fc.Result = res
return ec.marshalOCity2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCity(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_city(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_City_id(ctx, field)
case "name":
return ec.fieldContext_City_name(ctx, field)
case "language":
return ec.fieldContext_City_language(ctx, field)
case "createdAt":
return ec.fieldContext_City_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_City_updatedAt(ctx, field)
case "country":
return ec.fieldContext_City_country(ctx, field)
case "authors":
return ec.fieldContext_City_authors(ctx, field)
case "users":
return ec.fieldContext_City_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type City", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_address(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_address(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Address, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Address)
fc.Result = res
return ec.marshalOAddress2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAddress(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_address(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_Address_id(ctx, field)
case "street":
return ec.fieldContext_Address_street(ctx, field)
case "createdAt":
return ec.fieldContext_Address_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Address_updatedAt(ctx, field)
case "city":
return ec.fieldContext_Address_city(ctx, field)
case "country":
return ec.fieldContext_Address_country(ctx, field)
case "authors":
return ec.fieldContext_Address_authors(ctx, field)
case "users":
return ec.fieldContext_Address_users(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Address", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _User_stats(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_User_stats(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Stats, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.UserStats)
fc.Result = res
return ec.marshalOUserStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserStats(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_User_stats(_ 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) {
switch field.Name {
case "id":
return ec.fieldContext_UserStats_id(ctx, field)
case "activity":
return ec.fieldContext_UserStats_activity(ctx, field)
case "createdAt":
return ec.fieldContext_UserStats_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_UserStats_updatedAt(ctx, field)
case "user":
return ec.fieldContext_UserStats_user(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type UserStats", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _UserProfile_id(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserProfile_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserProfile_userId(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_userId(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UserID, 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.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserProfile_userId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserProfile_user(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserProfile_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _UserProfile_phoneNumber(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_phoneNumber(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.PhoneNumber, 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_UserProfile_phoneNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserProfile_website(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_website(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Website, 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_UserProfile_website(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserProfile_twitter(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_twitter(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Twitter, 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_UserProfile_twitter(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserProfile_facebook(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_facebook(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Facebook, 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_UserProfile_facebook(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserProfile_linkedIn(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_linkedIn(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.LinkedIn, 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_UserProfile_linkedIn(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserProfile_github(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_github(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Github, 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_UserProfile_github(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserProfile_preferences(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_preferences(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Preferences, 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.marshalOJSON2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserProfile_preferences(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type JSON does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _UserProfile_settings(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_settings(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Settings, 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.marshalOJSON2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserProfile_settings(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type JSON does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _UserProfile_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_UserProfile_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserProfile_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.UserProfile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserProfile_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_UserProfile_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserProfile",
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) _UserStats_id(ctx context.Context, field graphql.CollectedField, obj *model.UserStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserStats_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserStats_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserStats",
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) _UserStats_activity(ctx context.Context, field graphql.CollectedField, obj *model.UserStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserStats_activity(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Activity, 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.(int32)
fc.Result = res
return ec.marshalNInt2int32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserStats_activity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserStats",
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) _UserStats_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.UserStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserStats_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_UserStats_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserStats",
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) _UserStats_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.UserStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserStats_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_UserStats_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserStats",
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) _UserStats_user(ctx context.Context, field graphql.CollectedField, obj *model.UserStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_UserStats_user(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.User, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.User)
fc.Result = res
return ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_UserStats_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "UserStats",
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 "email":
return ec.fieldContext_User_email(ctx, field)
case "firstName":
return ec.fieldContext_User_firstName(ctx, field)
case "lastName":
return ec.fieldContext_User_lastName(ctx, field)
case "displayName":
return ec.fieldContext_User_displayName(ctx, field)
case "bio":
return ec.fieldContext_User_bio(ctx, field)
case "avatarUrl":
return ec.fieldContext_User_avatarUrl(ctx, field)
case "role":
return ec.fieldContext_User_role(ctx, field)
case "lastLoginAt":
return ec.fieldContext_User_lastLoginAt(ctx, field)
case "verified":
return ec.fieldContext_User_verified(ctx, field)
case "active":
return ec.fieldContext_User_active(ctx, field)
case "createdAt":
return ec.fieldContext_User_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_User_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_User_translations(ctx, field)
case "comments":
return ec.fieldContext_User_comments(ctx, field)
case "likes":
return ec.fieldContext_User_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_User_bookmarks(ctx, field)
case "collections":
return ec.fieldContext_User_collections(ctx, field)
case "contributions":
return ec.fieldContext_User_contributions(ctx, field)
case "country":
return ec.fieldContext_User_country(ctx, field)
case "city":
return ec.fieldContext_User_city(ctx, field)
case "address":
return ec.fieldContext_User_address(ctx, field)
case "stats":
return ec.fieldContext_User_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Word_id(ctx context.Context, field graphql.CollectedField, obj *model.Word) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Word_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Word_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Word",
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) _Word_name(ctx context.Context, field graphql.CollectedField, obj *model.Word) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Word_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Word_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Word",
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) _Word_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Word) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Word_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Word_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Word",
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) _Word_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Word) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Word_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Word_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Word",
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) _Word_concept(ctx context.Context, field graphql.CollectedField, obj *model.Word) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Word_concept(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Concept, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Concept)
fc.Result = res
return ec.marshalOConcept2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐConcept(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Word_concept(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Word",
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_Concept_id(ctx, field)
case "name":
return ec.fieldContext_Concept_name(ctx, field)
case "createdAt":
return ec.fieldContext_Concept_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Concept_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Concept_works(ctx, field)
case "words":
return ec.fieldContext_Concept_words(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Concept", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Word_works(ctx context.Context, field graphql.CollectedField, obj *model.Word) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Word_works(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Works, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Work)
fc.Result = res
return ec.marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Word_works(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Word",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_id(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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) _Work_name(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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) _Work_language(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_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) (any, 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 {
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_Work_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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) _Work_content(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Content, 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_Work_content(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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) _Work_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Work_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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) _Work_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_Work_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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) _Work_translations(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_translations(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Translations, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Translation)
fc.Result = res
return ec.marshalOTranslation2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_translations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Translation_id(ctx, field)
case "name":
return ec.fieldContext_Translation_name(ctx, field)
case "language":
return ec.fieldContext_Translation_language(ctx, field)
case "content":
return ec.fieldContext_Translation_content(ctx, field)
case "workId":
return ec.fieldContext_Translation_workId(ctx, field)
case "work":
return ec.fieldContext_Translation_work(ctx, field)
case "translator":
return ec.fieldContext_Translation_translator(ctx, field)
case "createdAt":
return ec.fieldContext_Translation_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Translation_updatedAt(ctx, field)
case "stats":
return ec.fieldContext_Translation_stats(ctx, field)
case "copyright":
return ec.fieldContext_Translation_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Translation_copyrightClaims(ctx, field)
case "comments":
return ec.fieldContext_Translation_comments(ctx, field)
case "likes":
return ec.fieldContext_Translation_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Translation", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_authors(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_authors(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Authors, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Author)
fc.Result = res
return ec.marshalOAuthor2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_authors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Author_id(ctx, field)
case "name":
return ec.fieldContext_Author_name(ctx, field)
case "language":
return ec.fieldContext_Author_language(ctx, field)
case "biography":
return ec.fieldContext_Author_biography(ctx, field)
case "birthDate":
return ec.fieldContext_Author_birthDate(ctx, field)
case "deathDate":
return ec.fieldContext_Author_deathDate(ctx, field)
case "createdAt":
return ec.fieldContext_Author_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Author_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Author_works(ctx, field)
case "books":
return ec.fieldContext_Author_books(ctx, field)
case "country":
return ec.fieldContext_Author_country(ctx, field)
case "city":
return ec.fieldContext_Author_city(ctx, field)
case "place":
return ec.fieldContext_Author_place(ctx, field)
case "address":
return ec.fieldContext_Author_address(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Author_copyrightClaims(ctx, field)
case "copyright":
return ec.fieldContext_Author_copyright(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Author", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_tags(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_tags(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Tags, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Tag)
fc.Result = res
return ec.marshalOTag2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTagᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_tags(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Tag_id(ctx, field)
case "name":
return ec.fieldContext_Tag_name(ctx, field)
case "createdAt":
return ec.fieldContext_Tag_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Tag_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Tag_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Tag", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_categories(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_categories(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Categories, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Category)
fc.Result = res
return ec.marshalOCategory2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCategoryᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_categories(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Category_id(ctx, field)
case "name":
return ec.fieldContext_Category_name(ctx, field)
case "createdAt":
return ec.fieldContext_Category_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Category_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Category_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Category", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_readabilityScore(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_readabilityScore(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.ReadabilityScore, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.ReadabilityScore)
fc.Result = res
return ec.marshalOReadabilityScore2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐReadabilityScore(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_readabilityScore(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_ReadabilityScore_id(ctx, field)
case "score":
return ec.fieldContext_ReadabilityScore_score(ctx, field)
case "language":
return ec.fieldContext_ReadabilityScore_language(ctx, field)
case "createdAt":
return ec.fieldContext_ReadabilityScore_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_ReadabilityScore_updatedAt(ctx, field)
case "work":
return ec.fieldContext_ReadabilityScore_work(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ReadabilityScore", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_writingStyle(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_writingStyle(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.WritingStyle, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.WritingStyle)
fc.Result = res
return ec.marshalOWritingStyle2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWritingStyle(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_writingStyle(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_WritingStyle_id(ctx, field)
case "name":
return ec.fieldContext_WritingStyle_name(ctx, field)
case "language":
return ec.fieldContext_WritingStyle_language(ctx, field)
case "createdAt":
return ec.fieldContext_WritingStyle_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_WritingStyle_updatedAt(ctx, field)
case "work":
return ec.fieldContext_WritingStyle_work(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type WritingStyle", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_emotions(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_emotions(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Emotions, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Emotion)
fc.Result = res
return ec.marshalOEmotion2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐEmotionᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_emotions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Emotion_id(ctx, field)
case "name":
return ec.fieldContext_Emotion_name(ctx, field)
case "language":
return ec.fieldContext_Emotion_language(ctx, field)
case "createdAt":
return ec.fieldContext_Emotion_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Emotion_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Emotion_user(ctx, field)
case "work":
return ec.fieldContext_Emotion_work(ctx, field)
case "collection":
return ec.fieldContext_Emotion_collection(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Emotion", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_topicClusters(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_topicClusters(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.TopicClusters, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.TopicCluster)
fc.Result = res
return ec.marshalOTopicCluster2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTopicClusterᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_topicClusters(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_TopicCluster_id(ctx, field)
case "name":
return ec.fieldContext_TopicCluster_name(ctx, field)
case "createdAt":
return ec.fieldContext_TopicCluster_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_TopicCluster_updatedAt(ctx, field)
case "works":
return ec.fieldContext_TopicCluster_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type TopicCluster", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_moods(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_moods(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Moods, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Mood)
fc.Result = res
return ec.marshalOMood2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐMoodᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_moods(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Mood_id(ctx, field)
case "name":
return ec.fieldContext_Mood_name(ctx, field)
case "language":
return ec.fieldContext_Mood_language(ctx, field)
case "createdAt":
return ec.fieldContext_Mood_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Mood_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Mood_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Mood", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_concepts(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_concepts(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Concepts, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Concept)
fc.Result = res
return ec.marshalOConcept2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐConceptᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_concepts(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Concept_id(ctx, field)
case "name":
return ec.fieldContext_Concept_name(ctx, field)
case "createdAt":
return ec.fieldContext_Concept_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Concept_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Concept_works(ctx, field)
case "words":
return ec.fieldContext_Concept_words(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Concept", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_linguisticLayers(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_linguisticLayers(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.LinguisticLayers, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.LinguisticLayer)
fc.Result = res
return ec.marshalOLinguisticLayer2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLinguisticLayerᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_linguisticLayers(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_LinguisticLayer_id(ctx, field)
case "name":
return ec.fieldContext_LinguisticLayer_name(ctx, field)
case "language":
return ec.fieldContext_LinguisticLayer_language(ctx, field)
case "createdAt":
return ec.fieldContext_LinguisticLayer_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_LinguisticLayer_updatedAt(ctx, field)
case "works":
return ec.fieldContext_LinguisticLayer_works(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type LinguisticLayer", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_stats(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_stats(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Stats, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.WorkStats)
fc.Result = res
return ec.marshalOWorkStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkStats(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_stats(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_WorkStats_id(ctx, field)
case "views":
return ec.fieldContext_WorkStats_views(ctx, field)
case "likes":
return ec.fieldContext_WorkStats_likes(ctx, field)
case "comments":
return ec.fieldContext_WorkStats_comments(ctx, field)
case "bookmarks":
return ec.fieldContext_WorkStats_bookmarks(ctx, field)
case "shares":
return ec.fieldContext_WorkStats_shares(ctx, field)
case "translationCount":
return ec.fieldContext_WorkStats_translationCount(ctx, field)
case "readingTime":
return ec.fieldContext_WorkStats_readingTime(ctx, field)
case "complexity":
return ec.fieldContext_WorkStats_complexity(ctx, field)
case "sentiment":
return ec.fieldContext_WorkStats_sentiment(ctx, field)
case "createdAt":
return ec.fieldContext_WorkStats_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_WorkStats_updatedAt(ctx, field)
case "work":
return ec.fieldContext_WorkStats_work(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type WorkStats", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_textMetadata(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_textMetadata(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.TextMetadata, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.TextMetadata)
fc.Result = res
return ec.marshalOTextMetadata2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTextMetadata(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_textMetadata(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_TextMetadata_id(ctx, field)
case "analysis":
return ec.fieldContext_TextMetadata_analysis(ctx, field)
case "language":
return ec.fieldContext_TextMetadata_language(ctx, field)
case "createdAt":
return ec.fieldContext_TextMetadata_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_TextMetadata_updatedAt(ctx, field)
case "work":
return ec.fieldContext_TextMetadata_work(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type TextMetadata", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_poeticAnalysis(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_poeticAnalysis(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.PoeticAnalysis, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.PoeticAnalysis)
fc.Result = res
return ec.marshalOPoeticAnalysis2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐPoeticAnalysis(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_poeticAnalysis(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_PoeticAnalysis_id(ctx, field)
case "structure":
return ec.fieldContext_PoeticAnalysis_structure(ctx, field)
case "language":
return ec.fieldContext_PoeticAnalysis_language(ctx, field)
case "createdAt":
return ec.fieldContext_PoeticAnalysis_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_PoeticAnalysis_updatedAt(ctx, field)
case "work":
return ec.fieldContext_PoeticAnalysis_work(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type PoeticAnalysis", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_copyright(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_copyright(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Copyright, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Copyright)
fc.Result = res
return ec.marshalOCopyright2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyright(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_copyright(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Copyright_id(ctx, field)
case "name":
return ec.fieldContext_Copyright_name(ctx, field)
case "language":
return ec.fieldContext_Copyright_language(ctx, field)
case "createdAt":
return ec.fieldContext_Copyright_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Copyright_updatedAt(ctx, field)
case "workOwner":
return ec.fieldContext_Copyright_workOwner(ctx, field)
case "works":
return ec.fieldContext_Copyright_works(ctx, field)
case "translations":
return ec.fieldContext_Copyright_translations(ctx, field)
case "books":
return ec.fieldContext_Copyright_books(ctx, field)
case "sources":
return ec.fieldContext_Copyright_sources(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Copyright", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_copyrightClaims(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_copyrightClaims(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CopyrightClaims, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.CopyrightClaim)
fc.Result = res
return ec.marshalOCopyrightClaim2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyrightClaimᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_copyrightClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_CopyrightClaim_id(ctx, field)
case "details":
return ec.fieldContext_CopyrightClaim_details(ctx, field)
case "createdAt":
return ec.fieldContext_CopyrightClaim_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_CopyrightClaim_updatedAt(ctx, field)
case "work":
return ec.fieldContext_CopyrightClaim_work(ctx, field)
case "translation":
return ec.fieldContext_CopyrightClaim_translation(ctx, field)
case "book":
return ec.fieldContext_CopyrightClaim_book(ctx, field)
case "source":
return ec.fieldContext_CopyrightClaim_source(ctx, field)
case "author":
return ec.fieldContext_CopyrightClaim_author(ctx, field)
case "user":
return ec.fieldContext_CopyrightClaim_user(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type CopyrightClaim", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_collections(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_collections(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Collections, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Collection)
fc.Result = res
return ec.marshalOCollection2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_collections(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Collection_id(ctx, field)
case "name":
return ec.fieldContext_Collection_name(ctx, field)
case "description":
return ec.fieldContext_Collection_description(ctx, field)
case "createdAt":
return ec.fieldContext_Collection_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Collection_updatedAt(ctx, field)
case "works":
return ec.fieldContext_Collection_works(ctx, field)
case "user":
return ec.fieldContext_Collection_user(ctx, field)
case "stats":
return ec.fieldContext_Collection_stats(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Collection", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_comments(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_comments(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Comments, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Comment)
fc.Result = res
return ec.marshalOComment2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_comments(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Comment_id(ctx, field)
case "text":
return ec.fieldContext_Comment_text(ctx, field)
case "createdAt":
return ec.fieldContext_Comment_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Comment_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Comment_user(ctx, field)
case "work":
return ec.fieldContext_Comment_work(ctx, field)
case "translation":
return ec.fieldContext_Comment_translation(ctx, field)
case "lineNumber":
return ec.fieldContext_Comment_lineNumber(ctx, field)
case "parentComment":
return ec.fieldContext_Comment_parentComment(ctx, field)
case "childComments":
return ec.fieldContext_Comment_childComments(ctx, field)
case "likes":
return ec.fieldContext_Comment_likes(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_likes(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_likes(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Likes, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Like)
fc.Result = res
return ec.marshalOLike2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLikeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_likes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Like_id(ctx, field)
case "createdAt":
return ec.fieldContext_Like_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Like_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Like_user(ctx, field)
case "work":
return ec.fieldContext_Like_work(ctx, field)
case "translation":
return ec.fieldContext_Like_translation(ctx, field)
case "comment":
return ec.fieldContext_Like_comment(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Like", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _Work_bookmarks(ctx context.Context, field graphql.CollectedField, obj *model.Work) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Work_bookmarks(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bookmarks, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]*model.Bookmark)
fc.Result = res
return ec.marshalOBookmark2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookmarkᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Work_bookmarks(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Work",
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_Bookmark_id(ctx, field)
case "name":
return ec.fieldContext_Bookmark_name(ctx, field)
case "createdAt":
return ec.fieldContext_Bookmark_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Bookmark_updatedAt(ctx, field)
case "user":
return ec.fieldContext_Bookmark_user(ctx, field)
case "work":
return ec.fieldContext_Bookmark_work(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Bookmark", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _WorkStats_id(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WorkStats_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_views(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_views(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Views, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WorkStats_views(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_likes(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_likes(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Likes, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WorkStats_likes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_comments(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_comments(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Comments, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WorkStats_comments(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_bookmarks(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_bookmarks(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bookmarks, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WorkStats_bookmarks(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_shares(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_shares(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Shares, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WorkStats_shares(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_translationCount(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_translationCount(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.TranslationCount, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WorkStats_translationCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_readingTime(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_readingTime(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.ReadingTime, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*int32)
fc.Result = res
return ec.marshalOInt2ᚖint32(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WorkStats_readingTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_complexity(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_complexity(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Complexity, 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_WorkStats_complexity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_sentiment(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_sentiment(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Sentiment, 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_WorkStats_sentiment(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_WorkStats_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_WorkStats_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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) _WorkStats_work(ctx context.Context, field graphql.CollectedField, obj *model.WorkStats) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WorkStats_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WorkStats_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WorkStats",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) _WritingStyle_id(ctx context.Context, field graphql.CollectedField, obj *model.WritingStyle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WritingStyle_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) (any, 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.(string)
fc.Result = res
return ec.marshalNID2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WritingStyle_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WritingStyle",
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) _WritingStyle_name(ctx context.Context, field graphql.CollectedField, obj *model.WritingStyle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WritingStyle_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WritingStyle_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WritingStyle",
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) _WritingStyle_language(ctx context.Context, field graphql.CollectedField, obj *model.WritingStyle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WritingStyle_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) (any, 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 {
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_WritingStyle_language(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WritingStyle",
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) _WritingStyle_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.WritingStyle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WritingStyle_createdAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_WritingStyle_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WritingStyle",
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) _WritingStyle_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.WritingStyle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WritingStyle_updatedAt(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.UpdatedAt, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
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_WritingStyle_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WritingStyle",
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) _WritingStyle_work(ctx context.Context, field graphql.CollectedField, obj *model.WritingStyle) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_WritingStyle_work(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Work, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*model.Work)
fc.Result = res
return ec.marshalOWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_WritingStyle_work(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "WritingStyle",
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_Work_id(ctx, field)
case "name":
return ec.fieldContext_Work_name(ctx, field)
case "language":
return ec.fieldContext_Work_language(ctx, field)
case "content":
return ec.fieldContext_Work_content(ctx, field)
case "createdAt":
return ec.fieldContext_Work_createdAt(ctx, field)
case "updatedAt":
return ec.fieldContext_Work_updatedAt(ctx, field)
case "translations":
return ec.fieldContext_Work_translations(ctx, field)
case "authors":
return ec.fieldContext_Work_authors(ctx, field)
case "tags":
return ec.fieldContext_Work_tags(ctx, field)
case "categories":
return ec.fieldContext_Work_categories(ctx, field)
case "readabilityScore":
return ec.fieldContext_Work_readabilityScore(ctx, field)
case "writingStyle":
return ec.fieldContext_Work_writingStyle(ctx, field)
case "emotions":
return ec.fieldContext_Work_emotions(ctx, field)
case "topicClusters":
return ec.fieldContext_Work_topicClusters(ctx, field)
case "moods":
return ec.fieldContext_Work_moods(ctx, field)
case "concepts":
return ec.fieldContext_Work_concepts(ctx, field)
case "linguisticLayers":
return ec.fieldContext_Work_linguisticLayers(ctx, field)
case "stats":
return ec.fieldContext_Work_stats(ctx, field)
case "textMetadata":
return ec.fieldContext_Work_textMetadata(ctx, field)
case "poeticAnalysis":
return ec.fieldContext_Work_poeticAnalysis(ctx, field)
case "copyright":
return ec.fieldContext_Work_copyright(ctx, field)
case "copyrightClaims":
return ec.fieldContext_Work_copyrightClaims(ctx, field)
case "collections":
return ec.fieldContext_Work_collections(ctx, field)
case "comments":
return ec.fieldContext_Work_comments(ctx, field)
case "likes":
return ec.fieldContext_Work_likes(ctx, field)
case "bookmarks":
return ec.fieldContext_Work_bookmarks(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Work", field.Name)
},
}
return fc, nil
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Directive_name(_ 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")
},
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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___Directive_description(_ 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
}
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
}
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) (any, 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(_ 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
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Locations, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]string)
fc.Result = res
return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Directive_locations(_ 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")
},
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Args, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]introspection.InputValue)
fc.Result = res
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Directive_args(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) {
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)
case "isDeprecated":
return ec.fieldContext___InputValue_isDeprecated(ctx, field)
case "deprecationReason":
return ec.fieldContext___InputValue_deprecationReason(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __InputValue", 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___Directive_args_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
return fc, nil
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___EnumValue_name(_ 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")
},
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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___EnumValue_description(_ 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
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsDeprecated(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ 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")
},
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.DeprecationReason(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ 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
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Field_name(_ 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")
},
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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___Field_description(_ 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
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Args, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]introspection.InputValue)
fc.Result = res
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) 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)
case "isDeprecated":
return ec.fieldContext___InputValue_isDeprecated(ctx, field)
case "deprecationReason":
return ec.fieldContext___InputValue_deprecationReason(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __InputValue", 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___Field_args_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Type, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Field_type(_ 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsDeprecated(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Field_isDeprecated(_ 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")
},
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.DeprecationReason(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Field_deprecationReason(_ 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
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___InputValue_name(_ 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) ___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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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___InputValue_description(_ 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
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Type, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___InputValue_type(_ 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.DefaultValue, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___InputValue_defaultValue(_ 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) ___InputValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsDeprecated(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___InputValue_isDeprecated(_ 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 Boolean does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) ___InputValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.DeprecationReason(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___InputValue_deprecationReason(_ 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
}
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)
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) (any, 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(_ 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")
},
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Types(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]introspection.Type)
fc.Result = res
return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_types(_ 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.QueryType(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_queryType(_ 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.MutationType(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_mutationType(_ 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.SubscriptionType(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*introspection.Type)
fc.Result = res
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_subscriptionType(_ 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Directives(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.([]introspection.Directive)
fc.Result = res
return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Schema_directives(_ 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 "isRepeatable":
return ec.fieldContext___Directive_isRepeatable(ctx, field)
case "locations":
return ec.fieldContext___Directive_locations(ctx, field)
case "args":
return ec.fieldContext___Directive_args(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name)
},
}
return fc, nil
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Kind(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_kind(_ 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")
},
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(*string)
fc.Result = res
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_name(_ 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
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, 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___Type_description(_ 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
}
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
}
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.SpecifiedByURL(), 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___Type_specifiedByURL(_ 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
}
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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]introspection.Field)
fc.Result = res
return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) 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
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.Interfaces(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]introspection.Type)
fc.Result = res
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_interfaces(_ 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.PossibleTypes(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]introspection.Type)
fc.Result = res
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_possibleTypes(_ 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(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)
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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]introspection.EnumValue)
fc.Result = res
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) 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
}
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
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.InputFields(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.([]introspection.InputValue)
fc.Result = res
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_inputFields(_ 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)
case "isDeprecated":
return ec.fieldContext___InputValue_isDeprecated(ctx, field)
case "deprecationReason":
return ec.fieldContext___InputValue_deprecationReason(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
},
}
return fc, nil
}
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)
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) (any, 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(_ 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 "specifiedByURL":
return ec.fieldContext___Type_specifiedByURL(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 "isOneOf":
return ec.fieldContext___Type_isOneOf(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
},
}
return fc, nil
}
func (ec *executionContext) ___Type_isOneOf(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_isOneOf(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) (any, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsOneOf(), nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
return graphql.Null
}
res := resTmp.(bool)
fc.Result = res
return ec.marshalOBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext___Type_isOneOf(_ 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 Boolean does not have child fields")
},
}
return fc, nil
}
// endregion **************************** field.gotpl *****************************
// region **************************** input.gotpl *****************************
func (ec *executionContext) unmarshalInputAuthorInput(ctx context.Context, obj any) (model.AuthorInput, error) {
var it model.AuthorInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"name", "language", "biography", "birthDate", "deathDate", "countryId", "cityId", "placeId", "addressId"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "name":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Name = data
case "language":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("language"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Language = data
case "biography":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("biography"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.Biography = data
case "birthDate":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("birthDate"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.BirthDate = data
case "deathDate":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deathDate"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.DeathDate = data
case "countryId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("countryId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.CountryID = data
case "cityId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cityId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.CityID = data
case "placeId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("placeId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.PlaceID = data
case "addressId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("addressId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.AddressID = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputBookmarkInput(ctx context.Context, obj any) (model.BookmarkInput, error) {
var it model.BookmarkInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"name", "workId"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "name":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.Name = data
case "workId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("workId"))
data, err := ec.unmarshalNID2string(ctx, v)
if err != nil {
return it, err
}
it.WorkID = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputCollectionInput(ctx context.Context, obj any) (model.CollectionInput, error) {
var it model.CollectionInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"name", "description", "workIds"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "name":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Name = data
case "description":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.Description = data
case "workIds":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("workIds"))
data, err := ec.unmarshalOID2ᚕstringᚄ(ctx, v)
if err != nil {
return it, err
}
it.WorkIds = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputCommentInput(ctx context.Context, obj any) (model.CommentInput, error) {
var it model.CommentInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"text", "workId", "translationId", "lineNumber", "parentCommentId"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "text":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Text = data
case "workId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("workId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.WorkID = data
case "translationId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("translationId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.TranslationID = data
case "lineNumber":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lineNumber"))
data, err := ec.unmarshalOInt2ᚖint32(ctx, v)
if err != nil {
return it, err
}
it.LineNumber = data
case "parentCommentId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("parentCommentId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.ParentCommentID = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputContributionInput(ctx context.Context, obj any) (model.ContributionInput, error) {
var it model.ContributionInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"name", "workId", "translationId", "status"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "name":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Name = data
case "workId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("workId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.WorkID = data
case "translationId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("translationId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.TranslationID = data
case "status":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status"))
data, err := ec.unmarshalOContributionStatus2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionStatus(ctx, v)
if err != nil {
return it, err
}
it.Status = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputLikeInput(ctx context.Context, obj any) (model.LikeInput, error) {
var it model.LikeInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"workId", "translationId", "commentId"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "workId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("workId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.WorkID = data
case "translationId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("translationId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.TranslationID = data
case "commentId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("commentId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.CommentID = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputLoginInput(ctx context.Context, obj any) (model.LoginInput, error) {
var it model.LoginInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"email", "password"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "email":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Email = data
case "password":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Password = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputRegisterInput(ctx context.Context, obj any) (model.RegisterInput, error) {
var it model.RegisterInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"username", "email", "password", "firstName", "lastName"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "username":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Username = data
case "email":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Email = data
case "password":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Password = data
case "firstName":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("firstName"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.FirstName = data
case "lastName":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lastName"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.LastName = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputSearchFilters(ctx context.Context, obj any) (model.SearchFilters, error) {
var it model.SearchFilters
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"languages", "categories", "tags", "authors", "dateFrom", "dateTo"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "languages":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("languages"))
data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v)
if err != nil {
return it, err
}
it.Languages = data
case "categories":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("categories"))
data, err := ec.unmarshalOID2ᚕstringᚄ(ctx, v)
if err != nil {
return it, err
}
it.Categories = data
case "tags":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tags"))
data, err := ec.unmarshalOID2ᚕstringᚄ(ctx, v)
if err != nil {
return it, err
}
it.Tags = data
case "authors":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("authors"))
data, err := ec.unmarshalOID2ᚕstringᚄ(ctx, v)
if err != nil {
return it, err
}
it.Authors = data
case "dateFrom":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dateFrom"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.DateFrom = data
case "dateTo":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dateTo"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.DateTo = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputTranslationInput(ctx context.Context, obj any) (model.TranslationInput, error) {
var it model.TranslationInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"name", "language", "content", "workId"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "name":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Name = data
case "language":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("language"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Language = data
case "content":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("content"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.Content = data
case "workId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("workId"))
data, err := ec.unmarshalNID2string(ctx, v)
if err != nil {
return it, err
}
it.WorkID = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputUserInput(ctx context.Context, obj any) (model.UserInput, error) {
var it model.UserInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"username", "email", "password", "firstName", "lastName", "displayName", "bio", "avatarUrl", "role", "verified", "active", "countryId", "cityId", "addressId"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "username":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.Username = data
case "email":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.Email = 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
case "firstName":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("firstName"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.FirstName = data
case "lastName":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lastName"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.LastName = data
case "displayName":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.DisplayName = data
case "bio":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bio"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.Bio = data
case "avatarUrl":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("avatarUrl"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.AvatarURL = data
case "role":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("role"))
data, err := ec.unmarshalOUserRole2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserRole(ctx, v)
if err != nil {
return it, err
}
it.Role = data
case "verified":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("verified"))
data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v)
if err != nil {
return it, err
}
it.Verified = data
case "active":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("active"))
data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v)
if err != nil {
return it, err
}
it.Active = data
case "countryId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("countryId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.CountryID = data
case "cityId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cityId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.CityID = data
case "addressId":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("addressId"))
data, err := ec.unmarshalOID2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.AddressID = data
}
}
return it, nil
}
func (ec *executionContext) unmarshalInputWorkInput(ctx context.Context, obj any) (model.WorkInput, error) {
var it model.WorkInput
asMap := map[string]any{}
for k, v := range obj.(map[string]any) {
asMap[k] = v
}
fieldsInOrder := [...]string{"name", "language", "content", "authorIds", "tagIds", "categoryIds"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
case "name":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Name = data
case "language":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("language"))
data, err := ec.unmarshalNString2string(ctx, v)
if err != nil {
return it, err
}
it.Language = data
case "content":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("content"))
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
it.Content = data
case "authorIds":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("authorIds"))
data, err := ec.unmarshalOID2ᚕstringᚄ(ctx, v)
if err != nil {
return it, err
}
it.AuthorIds = data
case "tagIds":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tagIds"))
data, err := ec.unmarshalOID2ᚕstringᚄ(ctx, v)
if err != nil {
return it, err
}
it.TagIds = data
case "categoryIds":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("categoryIds"))
data, err := ec.unmarshalOID2ᚕstringᚄ(ctx, v)
if err != nil {
return it, err
}
it.CategoryIds = data
}
}
return it, nil
}
// endregion **************************** input.gotpl *****************************
// region ************************** interface.gotpl ***************************
// endregion ************************** interface.gotpl ***************************
// region **************************** object.gotpl ****************************
var addressImplementors = []string{"Address"}
func (ec *executionContext) _Address(ctx context.Context, sel ast.SelectionSet, obj *model.Address) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, addressImplementors)
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("Address")
case "id":
out.Values[i] = ec._Address_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "street":
out.Values[i] = ec._Address_street(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Address_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Address_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "city":
out.Values[i] = ec._Address_city(ctx, field, obj)
case "country":
out.Values[i] = ec._Address_country(ctx, field, obj)
case "authors":
out.Values[i] = ec._Address_authors(ctx, field, obj)
case "users":
out.Values[i] = ec._Address_users(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 authPayloadImplementors = []string{"AuthPayload"}
func (ec *executionContext) _AuthPayload(ctx context.Context, sel ast.SelectionSet, obj *model.AuthPayload) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, authPayloadImplementors)
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("AuthPayload")
case "token":
out.Values[i] = ec._AuthPayload_token(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "user":
out.Values[i] = ec._AuthPayload_user(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 authorImplementors = []string{"Author"}
func (ec *executionContext) _Author(ctx context.Context, sel ast.SelectionSet, obj *model.Author) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, authorImplementors)
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("Author")
case "id":
out.Values[i] = ec._Author_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Author_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Author_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "biography":
out.Values[i] = ec._Author_biography(ctx, field, obj)
case "birthDate":
out.Values[i] = ec._Author_birthDate(ctx, field, obj)
case "deathDate":
out.Values[i] = ec._Author_deathDate(ctx, field, obj)
case "createdAt":
out.Values[i] = ec._Author_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Author_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "works":
out.Values[i] = ec._Author_works(ctx, field, obj)
case "books":
out.Values[i] = ec._Author_books(ctx, field, obj)
case "country":
out.Values[i] = ec._Author_country(ctx, field, obj)
case "city":
out.Values[i] = ec._Author_city(ctx, field, obj)
case "place":
out.Values[i] = ec._Author_place(ctx, field, obj)
case "address":
out.Values[i] = ec._Author_address(ctx, field, obj)
case "copyrightClaims":
out.Values[i] = ec._Author_copyrightClaims(ctx, field, obj)
case "copyright":
out.Values[i] = ec._Author_copyright(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 bookImplementors = []string{"Book"}
func (ec *executionContext) _Book(ctx context.Context, sel ast.SelectionSet, obj *model.Book) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, bookImplementors)
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("Book")
case "id":
out.Values[i] = ec._Book_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Book_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Book_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Book_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Book_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "works":
out.Values[i] = ec._Book_works(ctx, field, obj)
case "stats":
out.Values[i] = ec._Book_stats(ctx, field, obj)
case "copyright":
out.Values[i] = ec._Book_copyright(ctx, field, obj)
case "copyrightClaims":
out.Values[i] = ec._Book_copyrightClaims(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 bookStatsImplementors = []string{"BookStats"}
func (ec *executionContext) _BookStats(ctx context.Context, sel ast.SelectionSet, obj *model.BookStats) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, bookStatsImplementors)
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("BookStats")
case "id":
out.Values[i] = ec._BookStats_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "sales":
out.Values[i] = ec._BookStats_sales(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._BookStats_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._BookStats_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "book":
out.Values[i] = ec._BookStats_book(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 bookmarkImplementors = []string{"Bookmark"}
func (ec *executionContext) _Bookmark(ctx context.Context, sel ast.SelectionSet, obj *model.Bookmark) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, bookmarkImplementors)
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("Bookmark")
case "id":
out.Values[i] = ec._Bookmark_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Bookmark_name(ctx, field, obj)
case "createdAt":
out.Values[i] = ec._Bookmark_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Bookmark_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "user":
out.Values[i] = ec._Bookmark_user(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._Bookmark_work(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 categoryImplementors = []string{"Category"}
func (ec *executionContext) _Category(ctx context.Context, sel ast.SelectionSet, obj *model.Category) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, categoryImplementors)
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("Category")
case "id":
out.Values[i] = ec._Category_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Category_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Category_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Category_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "works":
out.Values[i] = ec._Category_works(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 cityImplementors = []string{"City"}
func (ec *executionContext) _City(ctx context.Context, sel ast.SelectionSet, obj *model.City) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, cityImplementors)
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("City")
case "id":
out.Values[i] = ec._City_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._City_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._City_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._City_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._City_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "country":
out.Values[i] = ec._City_country(ctx, field, obj)
case "authors":
out.Values[i] = ec._City_authors(ctx, field, obj)
case "users":
out.Values[i] = ec._City_users(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 collectionImplementors = []string{"Collection"}
func (ec *executionContext) _Collection(ctx context.Context, sel ast.SelectionSet, obj *model.Collection) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, collectionImplementors)
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("Collection")
case "id":
out.Values[i] = ec._Collection_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Collection_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "description":
out.Values[i] = ec._Collection_description(ctx, field, obj)
case "createdAt":
out.Values[i] = ec._Collection_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Collection_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "works":
out.Values[i] = ec._Collection_works(ctx, field, obj)
case "user":
out.Values[i] = ec._Collection_user(ctx, field, obj)
case "stats":
out.Values[i] = ec._Collection_stats(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 collectionStatsImplementors = []string{"CollectionStats"}
func (ec *executionContext) _CollectionStats(ctx context.Context, sel ast.SelectionSet, obj *model.CollectionStats) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, collectionStatsImplementors)
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("CollectionStats")
case "id":
out.Values[i] = ec._CollectionStats_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "items":
out.Values[i] = ec._CollectionStats_items(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._CollectionStats_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._CollectionStats_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "collection":
out.Values[i] = ec._CollectionStats_collection(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 commentImplementors = []string{"Comment"}
func (ec *executionContext) _Comment(ctx context.Context, sel ast.SelectionSet, obj *model.Comment) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, commentImplementors)
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("Comment")
case "id":
out.Values[i] = ec._Comment_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "text":
out.Values[i] = ec._Comment_text(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Comment_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Comment_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "user":
out.Values[i] = ec._Comment_user(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._Comment_work(ctx, field, obj)
case "translation":
out.Values[i] = ec._Comment_translation(ctx, field, obj)
case "lineNumber":
out.Values[i] = ec._Comment_lineNumber(ctx, field, obj)
case "parentComment":
out.Values[i] = ec._Comment_parentComment(ctx, field, obj)
case "childComments":
out.Values[i] = ec._Comment_childComments(ctx, field, obj)
case "likes":
out.Values[i] = ec._Comment_likes(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 conceptImplementors = []string{"Concept"}
func (ec *executionContext) _Concept(ctx context.Context, sel ast.SelectionSet, obj *model.Concept) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, conceptImplementors)
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("Concept")
case "id":
out.Values[i] = ec._Concept_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Concept_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Concept_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Concept_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "works":
out.Values[i] = ec._Concept_works(ctx, field, obj)
case "words":
out.Values[i] = ec._Concept_words(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 contributionImplementors = []string{"Contribution"}
func (ec *executionContext) _Contribution(ctx context.Context, sel ast.SelectionSet, obj *model.Contribution) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, contributionImplementors)
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("Contribution")
case "id":
out.Values[i] = ec._Contribution_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Contribution_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "status":
out.Values[i] = ec._Contribution_status(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Contribution_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Contribution_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "user":
out.Values[i] = ec._Contribution_user(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._Contribution_work(ctx, field, obj)
case "translation":
out.Values[i] = ec._Contribution_translation(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 copyrightImplementors = []string{"Copyright"}
func (ec *executionContext) _Copyright(ctx context.Context, sel ast.SelectionSet, obj *model.Copyright) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, copyrightImplementors)
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("Copyright")
case "id":
out.Values[i] = ec._Copyright_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Copyright_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Copyright_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Copyright_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Copyright_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "workOwner":
out.Values[i] = ec._Copyright_workOwner(ctx, field, obj)
case "works":
out.Values[i] = ec._Copyright_works(ctx, field, obj)
case "translations":
out.Values[i] = ec._Copyright_translations(ctx, field, obj)
case "books":
out.Values[i] = ec._Copyright_books(ctx, field, obj)
case "sources":
out.Values[i] = ec._Copyright_sources(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 copyrightClaimImplementors = []string{"CopyrightClaim"}
func (ec *executionContext) _CopyrightClaim(ctx context.Context, sel ast.SelectionSet, obj *model.CopyrightClaim) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, copyrightClaimImplementors)
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("CopyrightClaim")
case "id":
out.Values[i] = ec._CopyrightClaim_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "details":
out.Values[i] = ec._CopyrightClaim_details(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._CopyrightClaim_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._CopyrightClaim_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._CopyrightClaim_work(ctx, field, obj)
case "translation":
out.Values[i] = ec._CopyrightClaim_translation(ctx, field, obj)
case "book":
out.Values[i] = ec._CopyrightClaim_book(ctx, field, obj)
case "source":
out.Values[i] = ec._CopyrightClaim_source(ctx, field, obj)
case "author":
out.Values[i] = ec._CopyrightClaim_author(ctx, field, obj)
case "user":
out.Values[i] = ec._CopyrightClaim_user(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 countryImplementors = []string{"Country"}
func (ec *executionContext) _Country(ctx context.Context, sel ast.SelectionSet, obj *model.Country) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, countryImplementors)
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("Country")
case "id":
out.Values[i] = ec._Country_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Country_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Country_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Country_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Country_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "authors":
out.Values[i] = ec._Country_authors(ctx, field, obj)
case "users":
out.Values[i] = ec._Country_users(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 edgeImplementors = []string{"Edge"}
func (ec *executionContext) _Edge(ctx context.Context, sel ast.SelectionSet, obj *model.Edge) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, edgeImplementors)
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("Edge")
case "id":
out.Values[i] = ec._Edge_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "sourceTable":
out.Values[i] = ec._Edge_sourceTable(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "sourceId":
out.Values[i] = ec._Edge_sourceId(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "targetTable":
out.Values[i] = ec._Edge_targetTable(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "targetId":
out.Values[i] = ec._Edge_targetId(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "relation":
out.Values[i] = ec._Edge_relation(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Edge_language(ctx, field, obj)
case "extra":
out.Values[i] = ec._Edge_extra(ctx, field, obj)
case "createdAt":
out.Values[i] = ec._Edge_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Edge_updatedAt(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 emotionImplementors = []string{"Emotion"}
func (ec *executionContext) _Emotion(ctx context.Context, sel ast.SelectionSet, obj *model.Emotion) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, emotionImplementors)
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("Emotion")
case "id":
out.Values[i] = ec._Emotion_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Emotion_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Emotion_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Emotion_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Emotion_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "user":
out.Values[i] = ec._Emotion_user(ctx, field, obj)
case "work":
out.Values[i] = ec._Emotion_work(ctx, field, obj)
case "collection":
out.Values[i] = ec._Emotion_collection(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 likeImplementors = []string{"Like"}
func (ec *executionContext) _Like(ctx context.Context, sel ast.SelectionSet, obj *model.Like) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, likeImplementors)
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("Like")
case "id":
out.Values[i] = ec._Like_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Like_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Like_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "user":
out.Values[i] = ec._Like_user(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._Like_work(ctx, field, obj)
case "translation":
out.Values[i] = ec._Like_translation(ctx, field, obj)
case "comment":
out.Values[i] = ec._Like_comment(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 linguisticLayerImplementors = []string{"LinguisticLayer"}
func (ec *executionContext) _LinguisticLayer(ctx context.Context, sel ast.SelectionSet, obj *model.LinguisticLayer) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, linguisticLayerImplementors)
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("LinguisticLayer")
case "id":
out.Values[i] = ec._LinguisticLayer_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._LinguisticLayer_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._LinguisticLayer_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._LinguisticLayer_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._LinguisticLayer_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "works":
out.Values[i] = ec._LinguisticLayer_works(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 moodImplementors = []string{"Mood"}
func (ec *executionContext) _Mood(ctx context.Context, sel ast.SelectionSet, obj *model.Mood) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, moodImplementors)
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("Mood")
case "id":
out.Values[i] = ec._Mood_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Mood_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Mood_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Mood_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Mood_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "works":
out.Values[i] = ec._Mood_works(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 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 {
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
Object: field.Name,
Field: field,
})
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Mutation")
case "register":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_register(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "login":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_login(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createWork":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_createWork(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updateWork":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_updateWork(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deleteWork":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteWork(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createTranslation":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_createTranslation(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updateTranslation":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_updateTranslation(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deleteTranslation":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteTranslation(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createAuthor":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_createAuthor(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updateAuthor":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_updateAuthor(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deleteAuthor":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteAuthor(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updateUser":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_updateUser(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deleteUser":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteUser(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createCollection":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_createCollection(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updateCollection":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_updateCollection(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deleteCollection":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteCollection(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "addWorkToCollection":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_addWorkToCollection(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "removeWorkFromCollection":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_removeWorkFromCollection(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createComment":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_createComment(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updateComment":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_updateComment(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deleteComment":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteComment(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createLike":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_createLike(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deleteLike":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteLike(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createBookmark":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_createBookmark(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deleteBookmark":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteBookmark(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createContribution":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_createContribution(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updateContribution":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_updateContribution(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deleteContribution":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_deleteContribution(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "reviewContribution":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_reviewContribution(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "logout":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_logout(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "refreshToken":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_refreshToken(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "forgotPassword":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_forgotPassword(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "resetPassword":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_resetPassword(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "verifyEmail":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_verifyEmail(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "resendVerificationEmail":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_resendVerificationEmail(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updateProfile":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_updateProfile(ctx, field)
})
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "changePassword":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Mutation_changePassword(ctx, field)
})
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 placeImplementors = []string{"Place"}
func (ec *executionContext) _Place(ctx context.Context, sel ast.SelectionSet, obj *model.Place) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, placeImplementors)
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("Place")
case "id":
out.Values[i] = ec._Place_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Place_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Place_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Place_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Place_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "city":
out.Values[i] = ec._Place_city(ctx, field, obj)
case "country":
out.Values[i] = ec._Place_country(ctx, field, obj)
case "authors":
out.Values[i] = ec._Place_authors(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 poeticAnalysisImplementors = []string{"PoeticAnalysis"}
func (ec *executionContext) _PoeticAnalysis(ctx context.Context, sel ast.SelectionSet, obj *model.PoeticAnalysis) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, poeticAnalysisImplementors)
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("PoeticAnalysis")
case "id":
out.Values[i] = ec._PoeticAnalysis_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "structure":
out.Values[i] = ec._PoeticAnalysis_structure(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._PoeticAnalysis_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._PoeticAnalysis_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._PoeticAnalysis_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._PoeticAnalysis_work(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 queryImplementors = []string{"Query"}
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Query",
})
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
Object: field.Name,
Field: field,
})
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Query")
case "work":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_work(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "works":
field := field
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_works(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "translation":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_translation(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "translations":
field := field
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_translations(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "author":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_author(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "authors":
field := field
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_authors(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "user":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_user(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "userByEmail":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_userByEmail(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "userByUsername":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_userByUsername(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "users":
field := field
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_users(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "me":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_me(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "userProfile":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_userProfile(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "collection":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_collection(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "collections":
field := field
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_collections(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "tag":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_tag(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "tags":
field := field
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_tags(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "category":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_category(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "categories":
field := field
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_categories(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "comment":
field := field
innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_comment(ctx, field)
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "comments":
field := field
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_comments(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "search":
field := field
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_search(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "trendingWorks":
field := field
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_trendingWorks(ctx, field)
if res == graphql.Null {
atomic.AddUint32(&fs.Invalids, 1)
}
return res
}
rrm := func(ctx context.Context) graphql.Marshaler {
return ec.OperationContext.RootResolverMiddleware(ctx,
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
case "__type":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Query___type(ctx, field)
})
case "__schema":
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
return ec._Query___schema(ctx, field)
})
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 readabilityScoreImplementors = []string{"ReadabilityScore"}
func (ec *executionContext) _ReadabilityScore(ctx context.Context, sel ast.SelectionSet, obj *model.ReadabilityScore) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, readabilityScoreImplementors)
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("ReadabilityScore")
case "id":
out.Values[i] = ec._ReadabilityScore_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "score":
out.Values[i] = ec._ReadabilityScore_score(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._ReadabilityScore_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._ReadabilityScore_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._ReadabilityScore_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._ReadabilityScore_work(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 searchResultsImplementors = []string{"SearchResults"}
func (ec *executionContext) _SearchResults(ctx context.Context, sel ast.SelectionSet, obj *model.SearchResults) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, searchResultsImplementors)
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("SearchResults")
case "works":
out.Values[i] = ec._SearchResults_works(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "translations":
out.Values[i] = ec._SearchResults_translations(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "authors":
out.Values[i] = ec._SearchResults_authors(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "total":
out.Values[i] = ec._SearchResults_total(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 sourceImplementors = []string{"Source"}
func (ec *executionContext) _Source(ctx context.Context, sel ast.SelectionSet, obj *model.Source) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, sourceImplementors)
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("Source")
case "id":
out.Values[i] = ec._Source_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Source_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Source_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Source_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Source_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "copyright":
out.Values[i] = ec._Source_copyright(ctx, field, obj)
case "copyrightClaims":
out.Values[i] = ec._Source_copyrightClaims(ctx, field, obj)
case "works":
out.Values[i] = ec._Source_works(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 tagImplementors = []string{"Tag"}
func (ec *executionContext) _Tag(ctx context.Context, sel ast.SelectionSet, obj *model.Tag) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, tagImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Tag")
case "id":
out.Values[i] = ec._Tag_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Tag_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Tag_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Tag_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "works":
out.Values[i] = ec._Tag_works(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 textMetadataImplementors = []string{"TextMetadata"}
func (ec *executionContext) _TextMetadata(ctx context.Context, sel ast.SelectionSet, obj *model.TextMetadata) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, textMetadataImplementors)
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("TextMetadata")
case "id":
out.Values[i] = ec._TextMetadata_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "analysis":
out.Values[i] = ec._TextMetadata_analysis(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._TextMetadata_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._TextMetadata_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._TextMetadata_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._TextMetadata_work(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 topicClusterImplementors = []string{"TopicCluster"}
func (ec *executionContext) _TopicCluster(ctx context.Context, sel ast.SelectionSet, obj *model.TopicCluster) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, topicClusterImplementors)
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("TopicCluster")
case "id":
out.Values[i] = ec._TopicCluster_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._TopicCluster_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._TopicCluster_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._TopicCluster_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "works":
out.Values[i] = ec._TopicCluster_works(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 translationImplementors = []string{"Translation"}
func (ec *executionContext) _Translation(ctx context.Context, sel ast.SelectionSet, obj *model.Translation) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, translationImplementors)
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("Translation")
case "id":
out.Values[i] = ec._Translation_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Translation_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Translation_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "content":
out.Values[i] = ec._Translation_content(ctx, field, obj)
case "workId":
out.Values[i] = ec._Translation_workId(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._Translation_work(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "translator":
out.Values[i] = ec._Translation_translator(ctx, field, obj)
case "createdAt":
out.Values[i] = ec._Translation_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Translation_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "stats":
out.Values[i] = ec._Translation_stats(ctx, field, obj)
case "copyright":
out.Values[i] = ec._Translation_copyright(ctx, field, obj)
case "copyrightClaims":
out.Values[i] = ec._Translation_copyrightClaims(ctx, field, obj)
case "comments":
out.Values[i] = ec._Translation_comments(ctx, field, obj)
case "likes":
out.Values[i] = ec._Translation_likes(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 translationStatsImplementors = []string{"TranslationStats"}
func (ec *executionContext) _TranslationStats(ctx context.Context, sel ast.SelectionSet, obj *model.TranslationStats) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, translationStatsImplementors)
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("TranslationStats")
case "id":
out.Values[i] = ec._TranslationStats_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "views":
out.Values[i] = ec._TranslationStats_views(ctx, field, obj)
case "likes":
out.Values[i] = ec._TranslationStats_likes(ctx, field, obj)
case "comments":
out.Values[i] = ec._TranslationStats_comments(ctx, field, obj)
case "shares":
out.Values[i] = ec._TranslationStats_shares(ctx, field, obj)
case "readingTime":
out.Values[i] = ec._TranslationStats_readingTime(ctx, field, obj)
case "sentiment":
out.Values[i] = ec._TranslationStats_sentiment(ctx, field, obj)
case "createdAt":
out.Values[i] = ec._TranslationStats_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._TranslationStats_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "translation":
out.Values[i] = ec._TranslationStats_translation(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 userImplementors = []string{"User"}
func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *model.User) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
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 {
out.Invalids++
}
case "username":
out.Values[i] = ec._User_username(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "email":
out.Values[i] = ec._User_email(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "firstName":
out.Values[i] = ec._User_firstName(ctx, field, obj)
case "lastName":
out.Values[i] = ec._User_lastName(ctx, field, obj)
case "displayName":
out.Values[i] = ec._User_displayName(ctx, field, obj)
case "bio":
out.Values[i] = ec._User_bio(ctx, field, obj)
case "avatarUrl":
out.Values[i] = ec._User_avatarUrl(ctx, field, obj)
case "role":
out.Values[i] = ec._User_role(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "lastLoginAt":
out.Values[i] = ec._User_lastLoginAt(ctx, field, obj)
case "verified":
out.Values[i] = ec._User_verified(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "active":
out.Values[i] = ec._User_active(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._User_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._User_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "translations":
out.Values[i] = ec._User_translations(ctx, field, obj)
case "comments":
out.Values[i] = ec._User_comments(ctx, field, obj)
case "likes":
out.Values[i] = ec._User_likes(ctx, field, obj)
case "bookmarks":
out.Values[i] = ec._User_bookmarks(ctx, field, obj)
case "collections":
out.Values[i] = ec._User_collections(ctx, field, obj)
case "contributions":
out.Values[i] = ec._User_contributions(ctx, field, obj)
case "country":
out.Values[i] = ec._User_country(ctx, field, obj)
case "city":
out.Values[i] = ec._User_city(ctx, field, obj)
case "address":
out.Values[i] = ec._User_address(ctx, field, obj)
case "stats":
out.Values[i] = ec._User_stats(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 userProfileImplementors = []string{"UserProfile"}
func (ec *executionContext) _UserProfile(ctx context.Context, sel ast.SelectionSet, obj *model.UserProfile) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, userProfileImplementors)
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("UserProfile")
case "id":
out.Values[i] = ec._UserProfile_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "userId":
out.Values[i] = ec._UserProfile_userId(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "user":
out.Values[i] = ec._UserProfile_user(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "phoneNumber":
out.Values[i] = ec._UserProfile_phoneNumber(ctx, field, obj)
case "website":
out.Values[i] = ec._UserProfile_website(ctx, field, obj)
case "twitter":
out.Values[i] = ec._UserProfile_twitter(ctx, field, obj)
case "facebook":
out.Values[i] = ec._UserProfile_facebook(ctx, field, obj)
case "linkedIn":
out.Values[i] = ec._UserProfile_linkedIn(ctx, field, obj)
case "github":
out.Values[i] = ec._UserProfile_github(ctx, field, obj)
case "preferences":
out.Values[i] = ec._UserProfile_preferences(ctx, field, obj)
case "settings":
out.Values[i] = ec._UserProfile_settings(ctx, field, obj)
case "createdAt":
out.Values[i] = ec._UserProfile_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._UserProfile_updatedAt(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 userStatsImplementors = []string{"UserStats"}
func (ec *executionContext) _UserStats(ctx context.Context, sel ast.SelectionSet, obj *model.UserStats) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, userStatsImplementors)
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("UserStats")
case "id":
out.Values[i] = ec._UserStats_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "activity":
out.Values[i] = ec._UserStats_activity(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._UserStats_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._UserStats_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "user":
out.Values[i] = ec._UserStats_user(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 wordImplementors = []string{"Word"}
func (ec *executionContext) _Word(ctx context.Context, sel ast.SelectionSet, obj *model.Word) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, wordImplementors)
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("Word")
case "id":
out.Values[i] = ec._Word_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Word_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._Word_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Word_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "concept":
out.Values[i] = ec._Word_concept(ctx, field, obj)
case "works":
out.Values[i] = ec._Word_works(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 workImplementors = []string{"Work"}
func (ec *executionContext) _Work(ctx context.Context, sel ast.SelectionSet, obj *model.Work) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, workImplementors)
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("Work")
case "id":
out.Values[i] = ec._Work_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._Work_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._Work_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "content":
out.Values[i] = ec._Work_content(ctx, field, obj)
case "createdAt":
out.Values[i] = ec._Work_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._Work_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "translations":
out.Values[i] = ec._Work_translations(ctx, field, obj)
case "authors":
out.Values[i] = ec._Work_authors(ctx, field, obj)
case "tags":
out.Values[i] = ec._Work_tags(ctx, field, obj)
case "categories":
out.Values[i] = ec._Work_categories(ctx, field, obj)
case "readabilityScore":
out.Values[i] = ec._Work_readabilityScore(ctx, field, obj)
case "writingStyle":
out.Values[i] = ec._Work_writingStyle(ctx, field, obj)
case "emotions":
out.Values[i] = ec._Work_emotions(ctx, field, obj)
case "topicClusters":
out.Values[i] = ec._Work_topicClusters(ctx, field, obj)
case "moods":
out.Values[i] = ec._Work_moods(ctx, field, obj)
case "concepts":
out.Values[i] = ec._Work_concepts(ctx, field, obj)
case "linguisticLayers":
out.Values[i] = ec._Work_linguisticLayers(ctx, field, obj)
case "stats":
out.Values[i] = ec._Work_stats(ctx, field, obj)
case "textMetadata":
out.Values[i] = ec._Work_textMetadata(ctx, field, obj)
case "poeticAnalysis":
out.Values[i] = ec._Work_poeticAnalysis(ctx, field, obj)
case "copyright":
out.Values[i] = ec._Work_copyright(ctx, field, obj)
case "copyrightClaims":
out.Values[i] = ec._Work_copyrightClaims(ctx, field, obj)
case "collections":
out.Values[i] = ec._Work_collections(ctx, field, obj)
case "comments":
out.Values[i] = ec._Work_comments(ctx, field, obj)
case "likes":
out.Values[i] = ec._Work_likes(ctx, field, obj)
case "bookmarks":
out.Values[i] = ec._Work_bookmarks(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 workStatsImplementors = []string{"WorkStats"}
func (ec *executionContext) _WorkStats(ctx context.Context, sel ast.SelectionSet, obj *model.WorkStats) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, workStatsImplementors)
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("WorkStats")
case "id":
out.Values[i] = ec._WorkStats_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "views":
out.Values[i] = ec._WorkStats_views(ctx, field, obj)
case "likes":
out.Values[i] = ec._WorkStats_likes(ctx, field, obj)
case "comments":
out.Values[i] = ec._WorkStats_comments(ctx, field, obj)
case "bookmarks":
out.Values[i] = ec._WorkStats_bookmarks(ctx, field, obj)
case "shares":
out.Values[i] = ec._WorkStats_shares(ctx, field, obj)
case "translationCount":
out.Values[i] = ec._WorkStats_translationCount(ctx, field, obj)
case "readingTime":
out.Values[i] = ec._WorkStats_readingTime(ctx, field, obj)
case "complexity":
out.Values[i] = ec._WorkStats_complexity(ctx, field, obj)
case "sentiment":
out.Values[i] = ec._WorkStats_sentiment(ctx, field, obj)
case "createdAt":
out.Values[i] = ec._WorkStats_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._WorkStats_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._WorkStats_work(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 writingStyleImplementors = []string{"WritingStyle"}
func (ec *executionContext) _WritingStyle(ctx context.Context, sel ast.SelectionSet, obj *model.WritingStyle) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, writingStyleImplementors)
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("WritingStyle")
case "id":
out.Values[i] = ec._WritingStyle_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec._WritingStyle_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "language":
out.Values[i] = ec._WritingStyle_language(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "createdAt":
out.Values[i] = ec._WritingStyle_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "updatedAt":
out.Values[i] = ec._WritingStyle_updatedAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "work":
out.Values[i] = ec._WritingStyle_work(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 __DirectiveImplementors = []string{"__Directive"}
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("__Directive")
case "name":
out.Values[i] = ec.___Directive_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "description":
out.Values[i] = ec.___Directive_description(ctx, field, obj)
case "isRepeatable":
out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "locations":
out.Values[i] = ec.___Directive_locations(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "args":
out.Values[i] = ec.___Directive_args(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 __EnumValueImplementors = []string{"__EnumValue"}
func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("__EnumValue")
case "name":
out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "description":
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
case "isDeprecated":
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deprecationReason":
out.Values[i] = ec.___EnumValue_deprecationReason(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 __FieldImplementors = []string{"__Field"}
func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("__Field")
case "name":
out.Values[i] = ec.___Field_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "description":
out.Values[i] = ec.___Field_description(ctx, field, obj)
case "args":
out.Values[i] = ec.___Field_args(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "type":
out.Values[i] = ec.___Field_type(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "isDeprecated":
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deprecationReason":
out.Values[i] = ec.___Field_deprecationReason(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 __InputValueImplementors = []string{"__InputValue"}
func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("__InputValue")
case "name":
out.Values[i] = ec.___InputValue_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "description":
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
case "type":
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "defaultValue":
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
case "isDeprecated":
out.Values[i] = ec.___InputValue_isDeprecated(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "deprecationReason":
out.Values[i] = ec.___InputValue_deprecationReason(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 __SchemaImplementors = []string{"__Schema"}
func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
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)
case "types":
out.Values[i] = ec.___Schema_types(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "queryType":
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "mutationType":
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
case "subscriptionType":
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
case "directives":
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
if out.Values[i] == graphql.Null {
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 __TypeImplementors = []string{"__Type"}
func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
for i, field := range fields {
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("__Type")
case "kind":
out.Values[i] = ec.___Type_kind(ctx, field, obj)
if out.Values[i] == graphql.Null {
out.Invalids++
}
case "name":
out.Values[i] = ec.___Type_name(ctx, field, obj)
case "description":
out.Values[i] = ec.___Type_description(ctx, field, obj)
case "specifiedByURL":
out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj)
case "fields":
out.Values[i] = ec.___Type_fields(ctx, field, obj)
case "interfaces":
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
case "possibleTypes":
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
case "enumValues":
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
case "inputFields":
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
case "ofType":
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
case "isOneOf":
out.Values[i] = ec.___Type_isOneOf(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
}
// endregion **************************** object.gotpl ****************************
// region ***************************** type.gotpl *****************************
func (ec *executionContext) marshalNAuthPayload2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthPayload(ctx context.Context, sel ast.SelectionSet, v model.AuthPayload) graphql.Marshaler {
return ec._AuthPayload(ctx, sel, &v)
}
func (ec *executionContext) marshalNAuthPayload2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthPayload(ctx context.Context, sel ast.SelectionSet, v *model.AuthPayload) 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._AuthPayload(ctx, sel, v)
}
func (ec *executionContext) marshalNAuthor2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx context.Context, sel ast.SelectionSet, v model.Author) graphql.Marshaler {
return ec._Author(ctx, sel, &v)
}
func (ec *executionContext) marshalNAuthor2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Author) 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.marshalNAuthor2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalNAuthor2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx context.Context, sel ast.SelectionSet, v *model.Author) 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._Author(ctx, sel, v)
}
func (ec *executionContext) unmarshalNAuthorInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorInput(ctx context.Context, v any) (model.AuthorInput, error) {
res, err := ec.unmarshalInputAuthorInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNBook2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBook(ctx context.Context, sel ast.SelectionSet, v *model.Book) 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._Book(ctx, sel, v)
}
func (ec *executionContext) marshalNBookmark2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookmark(ctx context.Context, sel ast.SelectionSet, v model.Bookmark) graphql.Marshaler {
return ec._Bookmark(ctx, sel, &v)
}
func (ec *executionContext) marshalNBookmark2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookmark(ctx context.Context, sel ast.SelectionSet, v *model.Bookmark) 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._Bookmark(ctx, sel, v)
}
func (ec *executionContext) unmarshalNBookmarkInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookmarkInput(ctx context.Context, v any) (model.BookmarkInput, error) {
res, err := ec.unmarshalInputBookmarkInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v any) (bool, error) {
res, err := graphql.UnmarshalBoolean(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
_ = sel
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")
}
}
return res
}
func (ec *executionContext) marshalNCategory2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCategoryᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Category) 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.marshalNCategory2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCategory(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalNCategory2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCategory(ctx context.Context, sel ast.SelectionSet, v *model.Category) 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._Category(ctx, sel, v)
}
func (ec *executionContext) marshalNCollection2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx context.Context, sel ast.SelectionSet, v model.Collection) graphql.Marshaler {
return ec._Collection(ctx, sel, &v)
}
func (ec *executionContext) marshalNCollection2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Collection) 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.marshalNCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalNCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx context.Context, sel ast.SelectionSet, v *model.Collection) 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._Collection(ctx, sel, v)
}
func (ec *executionContext) unmarshalNCollectionInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionInput(ctx context.Context, v any) (model.CollectionInput, error) {
res, err := ec.unmarshalInputCollectionInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNComment2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx context.Context, sel ast.SelectionSet, v model.Comment) graphql.Marshaler {
return ec._Comment(ctx, sel, &v)
}
func (ec *executionContext) marshalNComment2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Comment) 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.marshalNComment2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalNComment2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx context.Context, sel ast.SelectionSet, v *model.Comment) 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._Comment(ctx, sel, v)
}
func (ec *executionContext) unmarshalNCommentInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentInput(ctx context.Context, v any) (model.CommentInput, error) {
res, err := ec.unmarshalInputCommentInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNConcept2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐConcept(ctx context.Context, sel ast.SelectionSet, v *model.Concept) 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._Concept(ctx, sel, v)
}
func (ec *executionContext) marshalNContribution2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContribution(ctx context.Context, sel ast.SelectionSet, v model.Contribution) graphql.Marshaler {
return ec._Contribution(ctx, sel, &v)
}
func (ec *executionContext) marshalNContribution2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContribution(ctx context.Context, sel ast.SelectionSet, v *model.Contribution) 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._Contribution(ctx, sel, v)
}
func (ec *executionContext) unmarshalNContributionInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionInput(ctx context.Context, v any) (model.ContributionInput, error) {
res, err := ec.unmarshalInputContributionInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) unmarshalNContributionStatus2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionStatus(ctx context.Context, v any) (model.ContributionStatus, error) {
var res model.ContributionStatus
err := res.UnmarshalGQL(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNContributionStatus2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionStatus(ctx context.Context, sel ast.SelectionSet, v model.ContributionStatus) graphql.Marshaler {
return v
}
func (ec *executionContext) marshalNCopyrightClaim2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyrightClaim(ctx context.Context, sel ast.SelectionSet, v *model.CopyrightClaim) 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._CopyrightClaim(ctx, sel, v)
}
func (ec *executionContext) marshalNEmotion2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐEmotion(ctx context.Context, sel ast.SelectionSet, v *model.Emotion) 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._Emotion(ctx, sel, v)
}
func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v any) (float64, error) {
res, err := graphql.UnmarshalFloatContext(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler {
_ = sel
res := graphql.MarshalFloatContext(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 graphql.WrapContextMarshaler(ctx, res)
}
func (ec *executionContext) unmarshalNID2string(ctx context.Context, v any) (string, error) {
res, err := graphql.UnmarshalID(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
_ = sel
res := graphql.MarshalID(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) unmarshalNInt2int32(ctx context.Context, v any) (int32, error) {
res, err := graphql.UnmarshalInt32(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNInt2int32(ctx context.Context, sel ast.SelectionSet, v int32) graphql.Marshaler {
_ = sel
res := graphql.MarshalInt32(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) marshalNLike2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLike(ctx context.Context, sel ast.SelectionSet, v model.Like) graphql.Marshaler {
return ec._Like(ctx, sel, &v)
}
func (ec *executionContext) marshalNLike2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLike(ctx context.Context, sel ast.SelectionSet, v *model.Like) 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._Like(ctx, sel, v)
}
func (ec *executionContext) unmarshalNLikeInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLikeInput(ctx context.Context, v any) (model.LikeInput, error) {
res, err := ec.unmarshalInputLikeInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNLinguisticLayer2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLinguisticLayer(ctx context.Context, sel ast.SelectionSet, v *model.LinguisticLayer) 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._LinguisticLayer(ctx, sel, v)
}
func (ec *executionContext) unmarshalNLoginInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLoginInput(ctx context.Context, v any) (model.LoginInput, error) {
res, err := ec.unmarshalInputLoginInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNMood2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐMood(ctx context.Context, sel ast.SelectionSet, v *model.Mood) 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._Mood(ctx, sel, v)
}
func (ec *executionContext) unmarshalNRegisterInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐRegisterInput(ctx context.Context, v any) (model.RegisterInput, error) {
res, err := ec.unmarshalInputRegisterInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNSearchResults2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSearchResults(ctx context.Context, sel ast.SelectionSet, v model.SearchResults) graphql.Marshaler {
return ec._SearchResults(ctx, sel, &v)
}
func (ec *executionContext) marshalNSearchResults2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSearchResults(ctx context.Context, sel ast.SelectionSet, v *model.SearchResults) 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._SearchResults(ctx, sel, v)
}
func (ec *executionContext) marshalNSource2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSource(ctx context.Context, sel ast.SelectionSet, v *model.Source) 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._Source(ctx, sel, v)
}
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v any) (string, error) {
res, err := graphql.UnmarshalString(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
_ = sel
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")
}
}
return res
}
func (ec *executionContext) marshalNTag2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Tag) 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.marshalNTag2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTag(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalNTag2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTag(ctx context.Context, sel ast.SelectionSet, v *model.Tag) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
return ec._Tag(ctx, sel, v)
}
func (ec *executionContext) marshalNTopicCluster2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTopicCluster(ctx context.Context, sel ast.SelectionSet, v *model.TopicCluster) 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._TopicCluster(ctx, sel, v)
}
func (ec *executionContext) marshalNTranslation2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx context.Context, sel ast.SelectionSet, v model.Translation) graphql.Marshaler {
return ec._Translation(ctx, sel, &v)
}
func (ec *executionContext) marshalNTranslation2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Translation) 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.marshalNTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalNTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx context.Context, sel ast.SelectionSet, v *model.Translation) 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._Translation(ctx, sel, v)
}
func (ec *executionContext) unmarshalNTranslationInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationInput(ctx context.Context, v any) (model.TranslationInput, error) {
res, err := ec.unmarshalInputTranslationInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNUser2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v model.User) graphql.Marshaler {
return ec._User(ctx, sel, &v)
}
func (ec *executionContext) marshalNUser2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.User) 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.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
return ec._User(ctx, sel, v)
}
func (ec *executionContext) unmarshalNUserInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserInput(ctx context.Context, v any) (model.UserInput, error) {
res, err := ec.unmarshalInputUserInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) unmarshalNUserRole2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserRole(ctx context.Context, v any) (model.UserRole, error) {
var res model.UserRole
err := res.UnmarshalGQL(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNUserRole2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserRole(ctx context.Context, sel ast.SelectionSet, v model.UserRole) graphql.Marshaler {
return v
}
func (ec *executionContext) marshalNWord2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWord(ctx context.Context, sel ast.SelectionSet, v *model.Word) 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._Word(ctx, sel, v)
}
func (ec *executionContext) marshalNWork2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx context.Context, sel ast.SelectionSet, v model.Work) graphql.Marshaler {
return ec._Work(ctx, sel, &v)
}
func (ec *executionContext) marshalNWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Work) 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.marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx context.Context, sel ast.SelectionSet, v *model.Work) 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._Work(ctx, sel, v)
}
func (ec *executionContext) unmarshalNWorkInput2terculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkInput(ctx context.Context, v any) (model.WorkInput, error) {
res, err := ec.unmarshalInputWorkInput(ctx, v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
return ec.___Directive(ctx, sel, &v)
}
func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v any) (string, error) {
res, err := graphql.UnmarshalString(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
_ = sel
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")
}
}
return res
}
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) {
var vSlice []any
vSlice = graphql.CoerceList(v)
var err error
res := make([]string, len(vSlice))
for i := range vSlice {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
if err != nil {
return nil, err
}
}
return res, nil
}
func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
return ec.___EnumValue(ctx, sel, &v)
}
func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
return ec.___Field(ctx, sel, &v)
}
func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
return ec.___InputValue(ctx, sel, &v)
}
func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
return ec.___Type(ctx, sel, &v)
}
func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
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")
}
return graphql.Null
}
return ec.___Type(ctx, sel, v)
}
func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v any) (string, error) {
res, err := graphql.UnmarshalString(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
_ = sel
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")
}
}
return res
}
func (ec *executionContext) marshalOAddress2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAddress(ctx context.Context, sel ast.SelectionSet, v *model.Address) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Address(ctx, sel, v)
}
func (ec *executionContext) marshalOAuthor2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthorᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Author) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNAuthor2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOAuthor2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐAuthor(ctx context.Context, sel ast.SelectionSet, v *model.Author) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Author(ctx, sel, v)
}
func (ec *executionContext) marshalOBook2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Book) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNBook2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBook(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOBook2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBook(ctx context.Context, sel ast.SelectionSet, v *model.Book) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Book(ctx, sel, v)
}
func (ec *executionContext) marshalOBookStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookStats(ctx context.Context, sel ast.SelectionSet, v *model.BookStats) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._BookStats(ctx, sel, v)
}
func (ec *executionContext) marshalOBookmark2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookmarkᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Bookmark) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNBookmark2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐBookmark(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v any) (bool, error) {
res, err := graphql.UnmarshalBoolean(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
_ = sel
_ = ctx
res := graphql.MarshalBoolean(v)
return res
}
func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v any) (*bool, error) {
if v == nil {
return nil, nil
}
res, err := graphql.UnmarshalBoolean(v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
if v == nil {
return graphql.Null
}
_ = sel
_ = ctx
res := graphql.MarshalBoolean(*v)
return res
}
func (ec *executionContext) marshalOCategory2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCategoryᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Category) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNCategory2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCategory(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOCategory2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCategory(ctx context.Context, sel ast.SelectionSet, v *model.Category) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Category(ctx, sel, v)
}
func (ec *executionContext) marshalOCity2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCity(ctx context.Context, sel ast.SelectionSet, v *model.City) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._City(ctx, sel, v)
}
func (ec *executionContext) marshalOCollection2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Collection) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOCollection2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollection(ctx context.Context, sel ast.SelectionSet, v *model.Collection) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Collection(ctx, sel, v)
}
func (ec *executionContext) marshalOCollectionStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCollectionStats(ctx context.Context, sel ast.SelectionSet, v *model.CollectionStats) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._CollectionStats(ctx, sel, v)
}
func (ec *executionContext) marshalOComment2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCommentᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Comment) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNComment2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOComment2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐComment(ctx context.Context, sel ast.SelectionSet, v *model.Comment) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Comment(ctx, sel, v)
}
func (ec *executionContext) marshalOConcept2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐConceptᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Concept) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNConcept2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐConcept(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOConcept2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐConcept(ctx context.Context, sel ast.SelectionSet, v *model.Concept) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Concept(ctx, sel, v)
}
func (ec *executionContext) marshalOContribution2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Contribution) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNContribution2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContribution(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) unmarshalOContributionStatus2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionStatus(ctx context.Context, v any) (*model.ContributionStatus, error) {
if v == nil {
return nil, nil
}
var res = new(model.ContributionStatus)
err := res.UnmarshalGQL(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOContributionStatus2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐContributionStatus(ctx context.Context, sel ast.SelectionSet, v *model.ContributionStatus) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return v
}
func (ec *executionContext) marshalOCopyright2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyright(ctx context.Context, sel ast.SelectionSet, v *model.Copyright) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Copyright(ctx, sel, v)
}
func (ec *executionContext) marshalOCopyrightClaim2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyrightClaimᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.CopyrightClaim) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNCopyrightClaim2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCopyrightClaim(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOCountry2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐCountry(ctx context.Context, sel ast.SelectionSet, v *model.Country) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Country(ctx, sel, v)
}
func (ec *executionContext) marshalOEmotion2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐEmotionᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Emotion) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNEmotion2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐEmotion(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) unmarshalOFloat2ᚖfloat64(ctx context.Context, v any) (*float64, error) {
if v == nil {
return nil, nil
}
res, err := graphql.UnmarshalFloatContext(ctx, v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOFloat2ᚖfloat64(ctx context.Context, sel ast.SelectionSet, v *float64) graphql.Marshaler {
if v == nil {
return graphql.Null
}
_ = sel
res := graphql.MarshalFloatContext(*v)
return graphql.WrapContextMarshaler(ctx, res)
}
func (ec *executionContext) unmarshalOID2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) {
if v == nil {
return nil, nil
}
var vSlice []any
vSlice = graphql.CoerceList(v)
var err error
res := make([]string, len(vSlice))
for i := range vSlice {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
res[i], err = ec.unmarshalNID2string(ctx, vSlice[i])
if err != nil {
return nil, err
}
}
return res, nil
}
func (ec *executionContext) marshalOID2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
for i := range v {
ret[i] = ec.marshalNID2string(ctx, sel, v[i])
}
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) unmarshalOID2ᚖstring(ctx context.Context, v any) (*string, error) {
if v == nil {
return nil, nil
}
res, err := graphql.UnmarshalID(v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOID2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
if v == nil {
return graphql.Null
}
_ = sel
_ = ctx
res := graphql.MarshalID(*v)
return res
}
func (ec *executionContext) unmarshalOInt2ᚖint32(ctx context.Context, v any) (*int32, error) {
if v == nil {
return nil, nil
}
res, err := graphql.UnmarshalInt32(v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOInt2ᚖint32(ctx context.Context, sel ast.SelectionSet, v *int32) graphql.Marshaler {
if v == nil {
return graphql.Null
}
_ = sel
_ = ctx
res := graphql.MarshalInt32(*v)
return res
}
func (ec *executionContext) unmarshalOJSON2ᚖstring(ctx context.Context, v any) (*string, error) {
if v == nil {
return nil, nil
}
res, err := graphql.UnmarshalString(v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOJSON2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
if v == nil {
return graphql.Null
}
_ = sel
_ = ctx
res := graphql.MarshalString(*v)
return res
}
func (ec *executionContext) marshalOLike2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLikeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Like) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNLike2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLike(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOLinguisticLayer2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLinguisticLayerᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.LinguisticLayer) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNLinguisticLayer2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐLinguisticLayer(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOMood2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐMoodᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Mood) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNMood2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐMood(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOPlace2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐPlace(ctx context.Context, sel ast.SelectionSet, v *model.Place) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Place(ctx, sel, v)
}
func (ec *executionContext) marshalOPoeticAnalysis2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐPoeticAnalysis(ctx context.Context, sel ast.SelectionSet, v *model.PoeticAnalysis) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._PoeticAnalysis(ctx, sel, v)
}
func (ec *executionContext) marshalOReadabilityScore2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐReadabilityScore(ctx context.Context, sel ast.SelectionSet, v *model.ReadabilityScore) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._ReadabilityScore(ctx, sel, v)
}
func (ec *executionContext) unmarshalOSearchFilters2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSearchFilters(ctx context.Context, v any) (*model.SearchFilters, error) {
if v == nil {
return nil, nil
}
res, err := ec.unmarshalInputSearchFilters(ctx, v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOSource2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSourceᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Source) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNSource2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSource(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOSource2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐSource(ctx context.Context, sel ast.SelectionSet, v *model.Source) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Source(ctx, sel, v)
}
func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) {
if v == nil {
return nil, nil
}
var vSlice []any
vSlice = graphql.CoerceList(v)
var err error
res := make([]string, len(vSlice))
for i := range vSlice {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
if err != nil {
return nil, err
}
}
return res, nil
}
func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
for i := range v {
ret[i] = ec.marshalNString2string(ctx, sel, v[i])
}
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v any) (*string, error) {
if v == nil {
return nil, nil
}
res, err := graphql.UnmarshalString(v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
if v == nil {
return graphql.Null
}
_ = sel
_ = ctx
res := graphql.MarshalString(*v)
return res
}
func (ec *executionContext) marshalOTag2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Tag) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNTag2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTag(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOTag2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTag(ctx context.Context, sel ast.SelectionSet, v *model.Tag) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Tag(ctx, sel, v)
}
func (ec *executionContext) marshalOTextMetadata2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTextMetadata(ctx context.Context, sel ast.SelectionSet, v *model.TextMetadata) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._TextMetadata(ctx, sel, v)
}
func (ec *executionContext) marshalOTopicCluster2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTopicClusterᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.TopicCluster) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNTopicCluster2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTopicCluster(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOTranslation2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Translation) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOTranslation2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslation(ctx context.Context, sel ast.SelectionSet, v *model.Translation) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Translation(ctx, sel, v)
}
func (ec *executionContext) marshalOTranslationStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐTranslationStats(ctx context.Context, sel ast.SelectionSet, v *model.TranslationStats) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._TranslationStats(ctx, sel, v)
}
func (ec *executionContext) marshalOUser2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.User) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOUser2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._User(ctx, sel, v)
}
func (ec *executionContext) marshalOUserProfile2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserProfile(ctx context.Context, sel ast.SelectionSet, v *model.UserProfile) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._UserProfile(ctx, sel, v)
}
func (ec *executionContext) unmarshalOUserRole2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserRole(ctx context.Context, v any) (*model.UserRole, error) {
if v == nil {
return nil, nil
}
var res = new(model.UserRole)
err := res.UnmarshalGQL(v)
return res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalOUserRole2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserRole(ctx context.Context, sel ast.SelectionSet, v *model.UserRole) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return v
}
func (ec *executionContext) marshalOUserStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐUserStats(ctx context.Context, sel ast.SelectionSet, v *model.UserStats) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._UserStats(ctx, sel, v)
}
func (ec *executionContext) marshalOWord2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWordᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Word) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNWord2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWord(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOWork2ᚕᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Work) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalOWork2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWork(ctx context.Context, sel ast.SelectionSet, v *model.Work) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._Work(ctx, sel, v)
}
func (ec *executionContext) marshalOWorkStats2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWorkStats(ctx context.Context, sel ast.SelectionSet, v *model.WorkStats) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._WorkStats(ctx, sel, v)
}
func (ec *executionContext) marshalOWritingStyle2ᚖterculᚋinternalᚋadaptersᚋgraphqlᚋmodelᚐWritingStyle(ctx context.Context, sel ast.SelectionSet, v *model.WritingStyle) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec._WritingStyle(ctx, sel, v)
}
func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
return ret
}
func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
if v == nil {
return graphql.Null
}
return ec.___Schema(ctx, sel, v)
}
func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
if v == nil {
return graphql.Null
}
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
if !isLen1 {
wg.Add(len(v))
}
for i := range v {
i := i
fc := &graphql.FieldContext{
Index: &i,
Result: &v[i],
}
ctx := graphql.WithFieldContext(ctx, fc)
f := func(i int) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = nil
}
}()
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
}
if isLen1 {
f(i)
} else {
go f(i)
}
}
wg.Wait()
for _, e := range ret {
if e == graphql.Null {
return graphql.Null
}
}
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 *****************************