7909 lines
203 KiB
Go
7909 lines
203 KiB
Go
|
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
||
|
|
||
|
package generated
|
||
|
|
||
|
import (
|
||
|
"bytes"
|
||
|
"context"
|
||
|
"errors"
|
||
|
"strconv"
|
||
|
"sync"
|
||
|
"sync/atomic"
|
||
|
|
||
|
"github.com/99designs/gqlgen/graphql"
|
||
|
"github.com/99designs/gqlgen/graphql/introspection"
|
||
|
"github.com/tribalwarshelp/shared/models"
|
||
|
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{
|
||
|
resolvers: cfg.Resolvers,
|
||
|
directives: cfg.Directives,
|
||
|
complexity: cfg.Complexity,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
type Config struct {
|
||
|
Resolvers ResolverRoot
|
||
|
Directives DirectiveRoot
|
||
|
Complexity ComplexityRoot
|
||
|
}
|
||
|
|
||
|
type ResolverRoot interface {
|
||
|
Player() PlayerResolver
|
||
|
Query() QueryResolver
|
||
|
Village() VillageResolver
|
||
|
}
|
||
|
|
||
|
type DirectiveRoot struct {
|
||
|
}
|
||
|
|
||
|
type ComplexityRoot struct {
|
||
|
LangVersion struct {
|
||
|
Host func(childComplexity int) int
|
||
|
Name func(childComplexity int) int
|
||
|
Tag func(childComplexity int) int
|
||
|
Timezone func(childComplexity int) int
|
||
|
}
|
||
|
|
||
|
LangVersionList struct {
|
||
|
Items func(childComplexity int) int
|
||
|
Total func(childComplexity int) int
|
||
|
}
|
||
|
|
||
|
Player struct {
|
||
|
Exist func(childComplexity int) int
|
||
|
ID func(childComplexity int) int
|
||
|
Name func(childComplexity int) int
|
||
|
Points func(childComplexity int) int
|
||
|
Rank func(childComplexity int) int
|
||
|
RankAtt func(childComplexity int) int
|
||
|
RankDef func(childComplexity int) int
|
||
|
RankSup func(childComplexity int) int
|
||
|
RankTotal func(childComplexity int) int
|
||
|
ScoreAtt func(childComplexity int) int
|
||
|
ScoreDef func(childComplexity int) int
|
||
|
ScoreSup func(childComplexity int) int
|
||
|
ScoreTotal func(childComplexity int) int
|
||
|
TotalVillages func(childComplexity int) int
|
||
|
Tribe func(childComplexity int) int
|
||
|
}
|
||
|
|
||
|
PlayerList struct {
|
||
|
Items func(childComplexity int) int
|
||
|
Total func(childComplexity int) int
|
||
|
}
|
||
|
|
||
|
Query struct {
|
||
|
LangVersion func(childComplexity int, tag models.LanguageTag) int
|
||
|
LangVersions func(childComplexity int, filter *models.LangVersionFilter) int
|
||
|
Player func(childComplexity int, server string, id int) int
|
||
|
Players func(childComplexity int, server string, filter *models.PlayerFilter) int
|
||
|
Server func(childComplexity int, key string) int
|
||
|
Servers func(childComplexity int, filter *models.ServerFilter) int
|
||
|
Tribe func(childComplexity int, server string, id int) int
|
||
|
Tribes func(childComplexity int, server string, filter *models.TribeFilter) int
|
||
|
Village func(childComplexity int, server string, id int) int
|
||
|
Villages func(childComplexity int, server string, filter *models.VillageFilter) int
|
||
|
}
|
||
|
|
||
|
Server struct {
|
||
|
ID func(childComplexity int) int
|
||
|
Key func(childComplexity int) int
|
||
|
LangVersionTag func(childComplexity int) int
|
||
|
Status func(childComplexity int) int
|
||
|
}
|
||
|
|
||
|
ServerList struct {
|
||
|
Items func(childComplexity int) int
|
||
|
Total func(childComplexity int) int
|
||
|
}
|
||
|
|
||
|
Tribe struct {
|
||
|
AllPoints func(childComplexity int) int
|
||
|
Exist func(childComplexity int) int
|
||
|
ID func(childComplexity int) int
|
||
|
Name func(childComplexity int) int
|
||
|
Points func(childComplexity int) int
|
||
|
Rank func(childComplexity int) int
|
||
|
RankAtt func(childComplexity int) int
|
||
|
RankDef func(childComplexity int) int
|
||
|
RankTotal func(childComplexity int) int
|
||
|
ScoreAtt func(childComplexity int) int
|
||
|
ScoreDef func(childComplexity int) int
|
||
|
ScoreTotal func(childComplexity int) int
|
||
|
Tag func(childComplexity int) int
|
||
|
TotalMembers func(childComplexity int) int
|
||
|
TotalVillages func(childComplexity int) int
|
||
|
}
|
||
|
|
||
|
TribeList struct {
|
||
|
Items func(childComplexity int) int
|
||
|
Total func(childComplexity int) int
|
||
|
}
|
||
|
|
||
|
Village struct {
|
||
|
Bonus func(childComplexity int) int
|
||
|
ID func(childComplexity int) int
|
||
|
Name func(childComplexity int) int
|
||
|
Player func(childComplexity int) int
|
||
|
Points func(childComplexity int) int
|
||
|
X func(childComplexity int) int
|
||
|
Y func(childComplexity int) int
|
||
|
}
|
||
|
|
||
|
VillageList struct {
|
||
|
Items func(childComplexity int) int
|
||
|
Total func(childComplexity int) int
|
||
|
}
|
||
|
}
|
||
|
|
||
|
type PlayerResolver interface {
|
||
|
Tribe(ctx context.Context, obj *models.Player) (*models.Tribe, error)
|
||
|
}
|
||
|
type QueryResolver interface {
|
||
|
LangVersions(ctx context.Context, filter *models.LangVersionFilter) (*LangVersionList, error)
|
||
|
LangVersion(ctx context.Context, tag models.LanguageTag) (*models.LangVersion, error)
|
||
|
Players(ctx context.Context, server string, filter *models.PlayerFilter) (*PlayerList, error)
|
||
|
Player(ctx context.Context, server string, id int) (*models.Player, error)
|
||
|
Servers(ctx context.Context, filter *models.ServerFilter) (*ServerList, error)
|
||
|
Server(ctx context.Context, key string) (*models.Server, error)
|
||
|
Tribes(ctx context.Context, server string, filter *models.TribeFilter) (*TribeList, error)
|
||
|
Tribe(ctx context.Context, server string, id int) (*models.Tribe, error)
|
||
|
Villages(ctx context.Context, server string, filter *models.VillageFilter) (*VillageList, error)
|
||
|
Village(ctx context.Context, server string, id int) (*models.Village, error)
|
||
|
}
|
||
|
type VillageResolver interface {
|
||
|
Player(ctx context.Context, obj *models.Village) (*models.Player, error)
|
||
|
}
|
||
|
|
||
|
type executableSchema struct {
|
||
|
resolvers ResolverRoot
|
||
|
directives DirectiveRoot
|
||
|
complexity ComplexityRoot
|
||
|
}
|
||
|
|
||
|
func (e *executableSchema) Schema() *ast.Schema {
|
||
|
return parsedSchema
|
||
|
}
|
||
|
|
||
|
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
|
||
|
ec := executionContext{nil, e}
|
||
|
_ = ec
|
||
|
switch typeName + "." + field {
|
||
|
|
||
|
case "LangVersion.host":
|
||
|
if e.complexity.LangVersion.Host == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.LangVersion.Host(childComplexity), true
|
||
|
|
||
|
case "LangVersion.name":
|
||
|
if e.complexity.LangVersion.Name == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.LangVersion.Name(childComplexity), true
|
||
|
|
||
|
case "LangVersion.tag":
|
||
|
if e.complexity.LangVersion.Tag == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.LangVersion.Tag(childComplexity), true
|
||
|
|
||
|
case "LangVersion.timezone":
|
||
|
if e.complexity.LangVersion.Timezone == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.LangVersion.Timezone(childComplexity), true
|
||
|
|
||
|
case "LangVersionList.items":
|
||
|
if e.complexity.LangVersionList.Items == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.LangVersionList.Items(childComplexity), true
|
||
|
|
||
|
case "LangVersionList.total":
|
||
|
if e.complexity.LangVersionList.Total == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.LangVersionList.Total(childComplexity), true
|
||
|
|
||
|
case "Player.exist":
|
||
|
if e.complexity.Player.Exist == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.Exist(childComplexity), true
|
||
|
|
||
|
case "Player.id":
|
||
|
if e.complexity.Player.ID == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.ID(childComplexity), true
|
||
|
|
||
|
case "Player.name":
|
||
|
if e.complexity.Player.Name == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.Name(childComplexity), true
|
||
|
|
||
|
case "Player.points":
|
||
|
if e.complexity.Player.Points == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.Points(childComplexity), true
|
||
|
|
||
|
case "Player.rank":
|
||
|
if e.complexity.Player.Rank == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.Rank(childComplexity), true
|
||
|
|
||
|
case "Player.rankAtt":
|
||
|
if e.complexity.Player.RankAtt == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.RankAtt(childComplexity), true
|
||
|
|
||
|
case "Player.rankDef":
|
||
|
if e.complexity.Player.RankDef == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.RankDef(childComplexity), true
|
||
|
|
||
|
case "Player.rankSup":
|
||
|
if e.complexity.Player.RankSup == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.RankSup(childComplexity), true
|
||
|
|
||
|
case "Player.rankTotal":
|
||
|
if e.complexity.Player.RankTotal == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.RankTotal(childComplexity), true
|
||
|
|
||
|
case "Player.scoreAtt":
|
||
|
if e.complexity.Player.ScoreAtt == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.ScoreAtt(childComplexity), true
|
||
|
|
||
|
case "Player.scoreDef":
|
||
|
if e.complexity.Player.ScoreDef == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.ScoreDef(childComplexity), true
|
||
|
|
||
|
case "Player.scoreSup":
|
||
|
if e.complexity.Player.ScoreSup == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.ScoreSup(childComplexity), true
|
||
|
|
||
|
case "Player.scoreTotal":
|
||
|
if e.complexity.Player.ScoreTotal == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.ScoreTotal(childComplexity), true
|
||
|
|
||
|
case "Player.totalVillages":
|
||
|
if e.complexity.Player.TotalVillages == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.TotalVillages(childComplexity), true
|
||
|
|
||
|
case "Player.tribe":
|
||
|
if e.complexity.Player.Tribe == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Player.Tribe(childComplexity), true
|
||
|
|
||
|
case "PlayerList.items":
|
||
|
if e.complexity.PlayerList.Items == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.PlayerList.Items(childComplexity), true
|
||
|
|
||
|
case "PlayerList.total":
|
||
|
if e.complexity.PlayerList.Total == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.PlayerList.Total(childComplexity), true
|
||
|
|
||
|
case "Query.langVersion":
|
||
|
if e.complexity.Query.LangVersion == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_langVersion_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.LangVersion(childComplexity, args["tag"].(models.LanguageTag)), true
|
||
|
|
||
|
case "Query.langVersions":
|
||
|
if e.complexity.Query.LangVersions == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_langVersions_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.LangVersions(childComplexity, args["filter"].(*models.LangVersionFilter)), true
|
||
|
|
||
|
case "Query.player":
|
||
|
if e.complexity.Query.Player == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_player_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.Player(childComplexity, args["server"].(string), args["id"].(int)), true
|
||
|
|
||
|
case "Query.players":
|
||
|
if e.complexity.Query.Players == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_players_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.Players(childComplexity, args["server"].(string), args["filter"].(*models.PlayerFilter)), true
|
||
|
|
||
|
case "Query.server":
|
||
|
if e.complexity.Query.Server == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_server_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.Server(childComplexity, args["key"].(string)), true
|
||
|
|
||
|
case "Query.servers":
|
||
|
if e.complexity.Query.Servers == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_servers_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.Servers(childComplexity, args["filter"].(*models.ServerFilter)), true
|
||
|
|
||
|
case "Query.tribe":
|
||
|
if e.complexity.Query.Tribe == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_tribe_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.Tribe(childComplexity, args["server"].(string), args["id"].(int)), true
|
||
|
|
||
|
case "Query.tribes":
|
||
|
if e.complexity.Query.Tribes == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_tribes_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.Tribes(childComplexity, args["server"].(string), args["filter"].(*models.TribeFilter)), true
|
||
|
|
||
|
case "Query.village":
|
||
|
if e.complexity.Query.Village == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_village_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.Village(childComplexity, args["server"].(string), args["id"].(int)), true
|
||
|
|
||
|
case "Query.villages":
|
||
|
if e.complexity.Query.Villages == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
args, err := ec.field_Query_villages_args(context.TODO(), rawArgs)
|
||
|
if err != nil {
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
return e.complexity.Query.Villages(childComplexity, args["server"].(string), args["filter"].(*models.VillageFilter)), true
|
||
|
|
||
|
case "Server.id":
|
||
|
if e.complexity.Server.ID == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Server.ID(childComplexity), true
|
||
|
|
||
|
case "Server.key":
|
||
|
if e.complexity.Server.Key == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Server.Key(childComplexity), true
|
||
|
|
||
|
case "Server.langVersionTag":
|
||
|
if e.complexity.Server.LangVersionTag == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Server.LangVersionTag(childComplexity), true
|
||
|
|
||
|
case "Server.status":
|
||
|
if e.complexity.Server.Status == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Server.Status(childComplexity), true
|
||
|
|
||
|
case "ServerList.items":
|
||
|
if e.complexity.ServerList.Items == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.ServerList.Items(childComplexity), true
|
||
|
|
||
|
case "ServerList.total":
|
||
|
if e.complexity.ServerList.Total == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.ServerList.Total(childComplexity), true
|
||
|
|
||
|
case "Tribe.allPoints":
|
||
|
if e.complexity.Tribe.AllPoints == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.AllPoints(childComplexity), true
|
||
|
|
||
|
case "Tribe.exist":
|
||
|
if e.complexity.Tribe.Exist == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.Exist(childComplexity), true
|
||
|
|
||
|
case "Tribe.id":
|
||
|
if e.complexity.Tribe.ID == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.ID(childComplexity), true
|
||
|
|
||
|
case "Tribe.name":
|
||
|
if e.complexity.Tribe.Name == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.Name(childComplexity), true
|
||
|
|
||
|
case "Tribe.points":
|
||
|
if e.complexity.Tribe.Points == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.Points(childComplexity), true
|
||
|
|
||
|
case "Tribe.rank":
|
||
|
if e.complexity.Tribe.Rank == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.Rank(childComplexity), true
|
||
|
|
||
|
case "Tribe.rankAtt":
|
||
|
if e.complexity.Tribe.RankAtt == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.RankAtt(childComplexity), true
|
||
|
|
||
|
case "Tribe.rankDef":
|
||
|
if e.complexity.Tribe.RankDef == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.RankDef(childComplexity), true
|
||
|
|
||
|
case "Tribe.rankTotal":
|
||
|
if e.complexity.Tribe.RankTotal == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.RankTotal(childComplexity), true
|
||
|
|
||
|
case "Tribe.scoreAtt":
|
||
|
if e.complexity.Tribe.ScoreAtt == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.ScoreAtt(childComplexity), true
|
||
|
|
||
|
case "Tribe.scoreDef":
|
||
|
if e.complexity.Tribe.ScoreDef == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.ScoreDef(childComplexity), true
|
||
|
|
||
|
case "Tribe.scoreTotal":
|
||
|
if e.complexity.Tribe.ScoreTotal == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.ScoreTotal(childComplexity), true
|
||
|
|
||
|
case "Tribe.tag":
|
||
|
if e.complexity.Tribe.Tag == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.Tag(childComplexity), true
|
||
|
|
||
|
case "Tribe.totalMembers":
|
||
|
if e.complexity.Tribe.TotalMembers == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.TotalMembers(childComplexity), true
|
||
|
|
||
|
case "Tribe.totalVillages":
|
||
|
if e.complexity.Tribe.TotalVillages == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Tribe.TotalVillages(childComplexity), true
|
||
|
|
||
|
case "TribeList.items":
|
||
|
if e.complexity.TribeList.Items == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.TribeList.Items(childComplexity), true
|
||
|
|
||
|
case "TribeList.total":
|
||
|
if e.complexity.TribeList.Total == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.TribeList.Total(childComplexity), true
|
||
|
|
||
|
case "Village.bonus":
|
||
|
if e.complexity.Village.Bonus == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Village.Bonus(childComplexity), true
|
||
|
|
||
|
case "Village.id":
|
||
|
if e.complexity.Village.ID == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Village.ID(childComplexity), true
|
||
|
|
||
|
case "Village.name":
|
||
|
if e.complexity.Village.Name == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Village.Name(childComplexity), true
|
||
|
|
||
|
case "Village.player":
|
||
|
if e.complexity.Village.Player == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Village.Player(childComplexity), true
|
||
|
|
||
|
case "Village.points":
|
||
|
if e.complexity.Village.Points == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Village.Points(childComplexity), true
|
||
|
|
||
|
case "Village.x":
|
||
|
if e.complexity.Village.X == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Village.X(childComplexity), true
|
||
|
|
||
|
case "Village.y":
|
||
|
if e.complexity.Village.Y == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.Village.Y(childComplexity), true
|
||
|
|
||
|
case "VillageList.items":
|
||
|
if e.complexity.VillageList.Items == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.VillageList.Items(childComplexity), true
|
||
|
|
||
|
case "VillageList.total":
|
||
|
if e.complexity.VillageList.Total == nil {
|
||
|
break
|
||
|
}
|
||
|
|
||
|
return e.complexity.VillageList.Total(childComplexity), true
|
||
|
|
||
|
}
|
||
|
return 0, false
|
||
|
}
|
||
|
|
||
|
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
|
||
|
rc := graphql.GetOperationContext(ctx)
|
||
|
ec := executionContext{rc, e}
|
||
|
first := true
|
||
|
|
||
|
switch rc.Operation.Operation {
|
||
|
case ast.Query:
|
||
|
return func(ctx context.Context) *graphql.Response {
|
||
|
if !first {
|
||
|
return nil
|
||
|
}
|
||
|
first = false
|
||
|
data := ec._Query(ctx, rc.Operation.SelectionSet)
|
||
|
var buf bytes.Buffer
|
||
|
data.MarshalGQL(&buf)
|
||
|
|
||
|
return &graphql.Response{
|
||
|
Data: buf.Bytes(),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
default:
|
||
|
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
type executionContext struct {
|
||
|
*graphql.OperationContext
|
||
|
*executableSchema
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
|
||
|
if ec.DisableIntrospection {
|
||
|
return nil, errors.New("introspection disabled")
|
||
|
}
|
||
|
return introspection.WrapSchema(parsedSchema), nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
|
||
|
if ec.DisableIntrospection {
|
||
|
return nil, errors.New("introspection disabled")
|
||
|
}
|
||
|
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
|
||
|
}
|
||
|
|
||
|
var sources = []*ast.Source{
|
||
|
&ast.Source{Name: "schema/directives.graphql", Input: `directive @goField(
|
||
|
forceResolver: Boolean
|
||
|
name: String
|
||
|
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
|
||
|
`, BuiltIn: false},
|
||
|
&ast.Source{Name: "schema/lang_version.graphql", Input: `enum LanguageTag {
|
||
|
PL
|
||
|
EN
|
||
|
DE
|
||
|
}
|
||
|
|
||
|
type LangVersion {
|
||
|
tag: LanguageTag!
|
||
|
name: String!
|
||
|
host: String!
|
||
|
timezone: String!
|
||
|
}
|
||
|
|
||
|
input LangVersionFilter {
|
||
|
tag: [LanguageTag!]
|
||
|
tagNEQ: [LanguageTag!]
|
||
|
|
||
|
host: [String!]
|
||
|
hostNEQ: [String!]
|
||
|
hostMATCH: String
|
||
|
hostIEQ: String
|
||
|
|
||
|
offset: Int
|
||
|
limit: Int
|
||
|
sort: String
|
||
|
}
|
||
|
|
||
|
type LangVersionList {
|
||
|
items: [LangVersion!]
|
||
|
total: Int!
|
||
|
}
|
||
|
|
||
|
extend type Query {
|
||
|
langVersions(filter: LangVersionFilter): LangVersionList!
|
||
|
langVersion(tag: LanguageTag!): LangVersion
|
||
|
}
|
||
|
`, BuiltIn: false},
|
||
|
&ast.Source{Name: "schema/player.graphql", Input: `type Player {
|
||
|
id: Int!
|
||
|
name: String!
|
||
|
totalVillages: Int!
|
||
|
points: Int!
|
||
|
rank: Int!
|
||
|
exist: Boolean!
|
||
|
rankAtt: Int!
|
||
|
scoreAtt: Int!
|
||
|
rankDef: Int!
|
||
|
scoreDef: Int!
|
||
|
rankSup: Int!
|
||
|
scoreSup: Int!
|
||
|
rankTotal: Int!
|
||
|
scoreTotal: Int!
|
||
|
tribe: Tribe @goField(forceResolver: true)
|
||
|
}
|
||
|
|
||
|
type PlayerList {
|
||
|
items: [Player!]
|
||
|
total: Int!
|
||
|
}
|
||
|
|
||
|
input PlayerFilter {
|
||
|
id: [Int!]
|
||
|
idNEQ: [Int!]
|
||
|
|
||
|
exist: Boolean
|
||
|
|
||
|
name: [String!]
|
||
|
nameNEQ: [String!]
|
||
|
nameMATCH: String
|
||
|
nameIEQ: String
|
||
|
|
||
|
totalVillages: Int
|
||
|
totalVillagesGT: Int
|
||
|
totalVillagesGTE: Int
|
||
|
totalVillagesLT: Int
|
||
|
totalVillagesLTE: Int
|
||
|
|
||
|
points: Int
|
||
|
pointsGT: Int
|
||
|
pointsGTE: Int
|
||
|
pointsLT: Int
|
||
|
pointsLTE: Int
|
||
|
|
||
|
rank: Int
|
||
|
rankGT: Int
|
||
|
rankGTE: Int
|
||
|
rankLT: Int
|
||
|
rankLTE: Int
|
||
|
|
||
|
rankAtt: Int
|
||
|
rankAttGT: Int
|
||
|
rankAttGTE: Int
|
||
|
rankAttLT: Int
|
||
|
rankAttLTE: Int
|
||
|
|
||
|
scoreAtt: Int
|
||
|
scoreAttGT: Int
|
||
|
scoreAttGTE: Int
|
||
|
scoreAttLT: Int
|
||
|
scoreAttLTE: Int
|
||
|
|
||
|
rankDef: Int
|
||
|
rankDefGT: Int
|
||
|
rankDefGTE: Int
|
||
|
rankDefLT: Int
|
||
|
rankDefLTE: Int
|
||
|
|
||
|
scoreDef: Int
|
||
|
scoreDefGT: Int
|
||
|
scoreDefGTE: Int
|
||
|
scoreDefLT: Int
|
||
|
scoreDefLTE: Int
|
||
|
|
||
|
rankSup: Int
|
||
|
rankSupGT: Int
|
||
|
rankSupGTE: Int
|
||
|
rankSupLT: Int
|
||
|
rankSupLTE: Int
|
||
|
|
||
|
scoreSup: Int
|
||
|
scoreSupGT: Int
|
||
|
scoreSupGTE: Int
|
||
|
scoreSupLT: Int
|
||
|
scoreSupLTE: Int
|
||
|
|
||
|
rankTotal: Int
|
||
|
rankTotalGT: Int
|
||
|
rankTotalGTE: Int
|
||
|
rankTotalLT: Int
|
||
|
rankTotalLTE: Int
|
||
|
|
||
|
scoreTotal: Int
|
||
|
scoreTotalGT: Int
|
||
|
scoreTotalGTE: Int
|
||
|
scoreTotalLT: Int
|
||
|
scoreTotalLTE: Int
|
||
|
|
||
|
tribeID: [Int!]
|
||
|
|
||
|
offset: Int
|
||
|
limit: Int
|
||
|
sort: String
|
||
|
}
|
||
|
|
||
|
extend type Query {
|
||
|
players(server: String!, filter: PlayerFilter): PlayerList!
|
||
|
player(server: String!, id: Int!): Player
|
||
|
}
|
||
|
`, BuiltIn: false},
|
||
|
&ast.Source{Name: "schema/server.graphql", Input: `enum ServerStatus {
|
||
|
OPEN
|
||
|
CLOSED
|
||
|
}
|
||
|
|
||
|
type Server {
|
||
|
id: Int!
|
||
|
key: String!
|
||
|
status: ServerStatus!
|
||
|
langVersionTag: LanguageTag!
|
||
|
}
|
||
|
|
||
|
type ServerList {
|
||
|
items: [Server!]
|
||
|
total: Int!
|
||
|
}
|
||
|
|
||
|
input ServerFilter {
|
||
|
id: [Int!]
|
||
|
idNEQ: [Int!]
|
||
|
|
||
|
key: [String!]
|
||
|
keyNEQ: [String!]
|
||
|
keyMATCH: String
|
||
|
keyIEQ: String
|
||
|
|
||
|
status: [ServerStatus!]
|
||
|
statusNEQ: [ServerStatus!]
|
||
|
|
||
|
langVersionTag: [LanguageTag!]
|
||
|
langVersionTagNEQ: [LanguageTag!]
|
||
|
|
||
|
offset: Int
|
||
|
limit: Int
|
||
|
sort: String
|
||
|
}
|
||
|
|
||
|
extend type Query {
|
||
|
servers(filter: ServerFilter): ServerList!
|
||
|
server(key: String!): Server
|
||
|
}
|
||
|
`, BuiltIn: false},
|
||
|
&ast.Source{Name: "schema/tribe.graphql", Input: `type Tribe {
|
||
|
id: Int!
|
||
|
name: String!
|
||
|
tag: String!
|
||
|
totalMembers: Int!
|
||
|
totalVillages: Int!
|
||
|
points: Int!
|
||
|
allPoints: Int!
|
||
|
rank: Int!
|
||
|
exist: Boolean!
|
||
|
rankAtt: Int!
|
||
|
scoreAtt: Int!
|
||
|
rankDef: Int!
|
||
|
scoreDef: Int!
|
||
|
rankTotal: Int!
|
||
|
scoreTotal: Int!
|
||
|
}
|
||
|
|
||
|
type TribeList {
|
||
|
items: [Tribe!]
|
||
|
total: Int!
|
||
|
}
|
||
|
|
||
|
input TribeFilter {
|
||
|
id: [Int!]
|
||
|
idNEQ: [Int!]
|
||
|
|
||
|
exist: Boolean
|
||
|
|
||
|
tag: [String!]
|
||
|
tagNEQ: [String!]
|
||
|
tagMATCH: String
|
||
|
tagIEQ: String
|
||
|
|
||
|
name: [String!]
|
||
|
nameNEQ: [String!]
|
||
|
nameMATCH: String
|
||
|
nameIEQ: String
|
||
|
|
||
|
totalMembers: Int
|
||
|
totalMembersGT: Int
|
||
|
totalMembersGTE: Int
|
||
|
totalMembersLT: Int
|
||
|
totalMembersLTE: Int
|
||
|
|
||
|
totalVillages: Int
|
||
|
totalVillagesGT: Int
|
||
|
totalVillagesGTE: Int
|
||
|
totalVillagesLT: Int
|
||
|
totalVillagesLTE: Int
|
||
|
|
||
|
points: Int
|
||
|
pointsGT: Int
|
||
|
pointsGTE: Int
|
||
|
pointsLT: Int
|
||
|
pointsLTE: Int
|
||
|
|
||
|
allPoints: Int
|
||
|
allPointsGT: Int
|
||
|
allPointsGTE: Int
|
||
|
allPointsLT: Int
|
||
|
allPointsLTE: Int
|
||
|
|
||
|
rank: Int
|
||
|
rankGT: Int
|
||
|
rankGTE: Int
|
||
|
rankLT: Int
|
||
|
rankLTE: Int
|
||
|
|
||
|
rankAtt: Int
|
||
|
rankAttGT: Int
|
||
|
rankAttGTE: Int
|
||
|
rankAttLT: Int
|
||
|
rankAttLTE: Int
|
||
|
|
||
|
scoreAtt: Int
|
||
|
scoreAttGT: Int
|
||
|
scoreAttGTE: Int
|
||
|
scoreAttLT: Int
|
||
|
scoreAttLTE: Int
|
||
|
|
||
|
rankDef: Int
|
||
|
rankDefGT: Int
|
||
|
rankDefGTE: Int
|
||
|
rankDefLT: Int
|
||
|
rankDefLTE: Int
|
||
|
|
||
|
scoreDef: Int
|
||
|
scoreDefGT: Int
|
||
|
scoreDefGTE: Int
|
||
|
scoreDefLT: Int
|
||
|
scoreDefLTE: Int
|
||
|
|
||
|
rankTotal: Int
|
||
|
rankTotalGT: Int
|
||
|
rankTotalGTE: Int
|
||
|
rankTotalLT: Int
|
||
|
rankTotalLTE: Int
|
||
|
|
||
|
scoreTotal: Int
|
||
|
scoreTotalGT: Int
|
||
|
scoreTotalGTE: Int
|
||
|
scoreTotalLT: Int
|
||
|
scoreTotalLTE: Int
|
||
|
|
||
|
offset: Int
|
||
|
limit: Int
|
||
|
sort: String
|
||
|
}
|
||
|
|
||
|
extend type Query {
|
||
|
tribes(server: String!, filter: TribeFilter): TribeList!
|
||
|
tribe(server: String!, id: Int!): Tribe
|
||
|
}
|
||
|
`, BuiltIn: false},
|
||
|
&ast.Source{Name: "schema/village.graphql", Input: `type Village {
|
||
|
id: Int!
|
||
|
name: String!
|
||
|
points: Int!
|
||
|
x: Int!
|
||
|
y: Int!
|
||
|
bonus: Int!
|
||
|
player: Player @goField(forceResolver: true)
|
||
|
}
|
||
|
|
||
|
type VillageList {
|
||
|
items: [Village!]
|
||
|
total: Int!
|
||
|
}
|
||
|
|
||
|
input VillageFilter {
|
||
|
id: [Int!]
|
||
|
idNEQ: [Int!]
|
||
|
|
||
|
name: [String!]
|
||
|
nameNEQ: [String!]
|
||
|
nameMATCH: String
|
||
|
nameIEQ: String
|
||
|
|
||
|
points: Int
|
||
|
pointsGT: Int
|
||
|
pointsGTE: Int
|
||
|
pointsLT: Int
|
||
|
pointsLTE: Int
|
||
|
|
||
|
bonus: Int
|
||
|
bonusGT: Int
|
||
|
bonusGTE: Int
|
||
|
bonusLT: Int
|
||
|
bonusLTE: Int
|
||
|
|
||
|
playerID: [Int!]
|
||
|
|
||
|
offset: Int
|
||
|
limit: Int
|
||
|
sort: String
|
||
|
}
|
||
|
|
||
|
extend type Query {
|
||
|
villages(server: String!, filter: VillageFilter): VillageList!
|
||
|
village(server: String!, id: Int!): Village
|
||
|
}
|
||
|
`, BuiltIn: false},
|
||
|
}
|
||
|
var parsedSchema = gqlparser.MustLoadSchema(sources...)
|
||
|
|
||
|
// endregion ************************** generated!.gotpl **************************
|
||
|
|
||
|
// region ***************************** args.gotpl *****************************
|
||
|
|
||
|
func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 string
|
||
|
if tmp, ok := rawArgs["name"]; ok {
|
||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["name"] = arg0
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_langVersion_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 models.LanguageTag
|
||
|
if tmp, ok := rawArgs["tag"]; ok {
|
||
|
arg0, err = ec.unmarshalNLanguageTag2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTag(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["tag"] = arg0
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_langVersions_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 *models.LangVersionFilter
|
||
|
if tmp, ok := rawArgs["filter"]; ok {
|
||
|
arg0, err = ec.unmarshalOLangVersionFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersionFilter(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["filter"] = arg0
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_player_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 string
|
||
|
if tmp, ok := rawArgs["server"]; ok {
|
||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["server"] = arg0
|
||
|
var arg1 int
|
||
|
if tmp, ok := rawArgs["id"]; ok {
|
||
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["id"] = arg1
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_players_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 string
|
||
|
if tmp, ok := rawArgs["server"]; ok {
|
||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["server"] = arg0
|
||
|
var arg1 *models.PlayerFilter
|
||
|
if tmp, ok := rawArgs["filter"]; ok {
|
||
|
arg1, err = ec.unmarshalOPlayerFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayerFilter(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["filter"] = arg1
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_server_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 string
|
||
|
if tmp, ok := rawArgs["key"]; ok {
|
||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["key"] = arg0
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_servers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 *models.ServerFilter
|
||
|
if tmp, ok := rawArgs["filter"]; ok {
|
||
|
arg0, err = ec.unmarshalOServerFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerFilter(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["filter"] = arg0
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_tribe_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 string
|
||
|
if tmp, ok := rawArgs["server"]; ok {
|
||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["server"] = arg0
|
||
|
var arg1 int
|
||
|
if tmp, ok := rawArgs["id"]; ok {
|
||
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["id"] = arg1
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_tribes_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 string
|
||
|
if tmp, ok := rawArgs["server"]; ok {
|
||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["server"] = arg0
|
||
|
var arg1 *models.TribeFilter
|
||
|
if tmp, ok := rawArgs["filter"]; ok {
|
||
|
arg1, err = ec.unmarshalOTribeFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribeFilter(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["filter"] = arg1
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_village_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 string
|
||
|
if tmp, ok := rawArgs["server"]; ok {
|
||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["server"] = arg0
|
||
|
var arg1 int
|
||
|
if tmp, ok := rawArgs["id"]; ok {
|
||
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["id"] = arg1
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field_Query_villages_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 string
|
||
|
if tmp, ok := rawArgs["server"]; ok {
|
||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["server"] = arg0
|
||
|
var arg1 *models.VillageFilter
|
||
|
if tmp, ok := rawArgs["filter"]; ok {
|
||
|
arg1, err = ec.unmarshalOVillageFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillageFilter(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["filter"] = arg1
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 bool
|
||
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
||
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["includeDeprecated"] = arg0
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||
|
var err error
|
||
|
args := map[string]interface{}{}
|
||
|
var arg0 bool
|
||
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
||
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
args["includeDeprecated"] = arg0
|
||
|
return args, nil
|
||
|
}
|
||
|
|
||
|
// endregion ***************************** args.gotpl *****************************
|
||
|
|
||
|
// region ************************** directives.gotpl **************************
|
||
|
|
||
|
// endregion ************************** directives.gotpl **************************
|
||
|
|
||
|
// region **************************** field.gotpl *****************************
|
||
|
|
||
|
func (ec *executionContext) _LangVersion_tag(ctx context.Context, field graphql.CollectedField, obj *models.LangVersion) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "LangVersion",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Tag, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(models.LanguageTag)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNLanguageTag2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTag(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _LangVersion_name(ctx context.Context, field graphql.CollectedField, obj *models.LangVersion) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "LangVersion",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Name, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _LangVersion_host(ctx context.Context, field graphql.CollectedField, obj *models.LangVersion) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "LangVersion",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Host, 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) _LangVersion_timezone(ctx context.Context, field graphql.CollectedField, obj *models.LangVersion) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "LangVersion",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Timezone, 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) _LangVersionList_items(ctx context.Context, field graphql.CollectedField, obj *LangVersionList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "LangVersionList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Items, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]*models.LangVersion)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOLangVersion2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersionᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _LangVersionList_total(ctx context.Context, field graphql.CollectedField, obj *LangVersionList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "LangVersionList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Total, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_id(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ID, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_name(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Name, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_totalVillages(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.TotalVillages, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_points(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Points, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_rank(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Rank, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_exist(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Exist, 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.marshalNBoolean2ᚖbool(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_rankAtt(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.RankAtt, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_scoreAtt(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ScoreAtt, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_rankDef(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.RankDef, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_scoreDef(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ScoreDef, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_rankSup(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.RankSup, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_scoreSup(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ScoreSup, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_rankTotal(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.RankTotal, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_scoreTotal(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ScoreTotal, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Player_tribe(ctx context.Context, field graphql.CollectedField, obj *models.Player) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Player",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Player().Tribe(rctx, obj)
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*models.Tribe)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOTribe2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribe(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _PlayerList_items(ctx context.Context, field graphql.CollectedField, obj *PlayerList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "PlayerList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Items, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]*models.Player)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOPlayer2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayerᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _PlayerList_total(ctx context.Context, field graphql.CollectedField, obj *PlayerList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "PlayerList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Total, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_langVersions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_langVersions_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().LangVersions(rctx, args["filter"].(*models.LangVersionFilter))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*LangVersionList)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNLangVersionList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐLangVersionList(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_langVersion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_langVersion_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().LangVersion(rctx, args["tag"].(models.LanguageTag))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*models.LangVersion)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOLangVersion2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersion(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_players(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_players_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().Players(rctx, args["server"].(string), args["filter"].(*models.PlayerFilter))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*PlayerList)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNPlayerList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐPlayerList(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_player(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_player_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().Player(rctx, args["server"].(string), args["id"].(int))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*models.Player)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOPlayer2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayer(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_servers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_servers_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().Servers(rctx, args["filter"].(*models.ServerFilter))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*ServerList)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNServerList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐServerList(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_server(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_server_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().Server(rctx, args["key"].(string))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*models.Server)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOServer2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServer(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_tribes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_tribes_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().Tribes(rctx, args["server"].(string), args["filter"].(*models.TribeFilter))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*TribeList)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNTribeList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐTribeList(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_tribe(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_tribe_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().Tribe(rctx, args["server"].(string), args["id"].(int))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*models.Tribe)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOTribe2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribe(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_villages(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_villages_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().Villages(rctx, args["server"].(string), args["filter"].(*models.VillageFilter))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*VillageList)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNVillageList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐVillageList(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query_village(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query_village_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Query().Village(rctx, args["server"].(string), args["id"].(int))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*models.Village)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOVillage2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillage(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field_Query___type_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.introspectType(args["name"].(string))
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.introspectSchema()
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*introspection.Schema)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Server_id(ctx context.Context, field graphql.CollectedField, obj *models.Server) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Server",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ID, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Server_key(ctx context.Context, field graphql.CollectedField, obj *models.Server) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Server",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Key, 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) _Server_status(ctx context.Context, field graphql.CollectedField, obj *models.Server) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Server",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.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.(models.ServerStatus)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNServerStatus2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerStatus(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Server_langVersionTag(ctx context.Context, field graphql.CollectedField, obj *models.Server) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Server",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.LangVersionTag, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(models.LanguageTag)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNLanguageTag2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTag(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _ServerList_items(ctx context.Context, field graphql.CollectedField, obj *ServerList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "ServerList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Items, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]*models.Server)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOServer2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _ServerList_total(ctx context.Context, field graphql.CollectedField, obj *ServerList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "ServerList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Total, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_id(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ID, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_name(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Name, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_tag(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Tag, 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) _Tribe_totalMembers(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.TotalMembers, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_totalVillages(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.TotalVillages, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_points(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Points, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_allPoints(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.AllPoints, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_rank(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Rank, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_exist(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Exist, 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.marshalNBoolean2ᚖbool(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_rankAtt(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.RankAtt, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_scoreAtt(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ScoreAtt, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_rankDef(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.RankDef, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_scoreDef(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ScoreDef, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_rankTotal(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.RankTotal, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Tribe_scoreTotal(ctx context.Context, field graphql.CollectedField, obj *models.Tribe) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Tribe",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ScoreTotal, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _TribeList_items(ctx context.Context, field graphql.CollectedField, obj *TribeList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "TribeList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Items, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]*models.Tribe)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOTribe2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribeᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _TribeList_total(ctx context.Context, field graphql.CollectedField, obj *TribeList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "TribeList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Total, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Village_id(ctx context.Context, field graphql.CollectedField, obj *models.Village) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Village",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.ID, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Village_name(ctx context.Context, field graphql.CollectedField, obj *models.Village) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Village",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Name, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Village_points(ctx context.Context, field graphql.CollectedField, obj *models.Village) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Village",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Points, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Village_x(ctx context.Context, field graphql.CollectedField, obj *models.Village) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Village",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.X, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Village_y(ctx context.Context, field graphql.CollectedField, obj *models.Village) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Village",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Y, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Village_bonus(ctx context.Context, field graphql.CollectedField, obj *models.Village) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Village",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Bonus, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _Village_player(ctx context.Context, field graphql.CollectedField, obj *models.Village) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "Village",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return ec.resolvers.Village().Player(rctx, obj)
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*models.Player)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOPlayer2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayer(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _VillageList_items(ctx context.Context, field graphql.CollectedField, obj *VillageList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "VillageList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Items, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]*models.Village)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOVillage2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillageᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) _VillageList_total(ctx context.Context, field graphql.CollectedField, obj *VillageList) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "VillageList",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Total, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(int)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Directive",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Name, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Directive",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Description, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Directive",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Locations, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Directive",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Args, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]introspection.InputValue)
|
||
|
fc.Result = res
|
||
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__EnumValue",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Name, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__EnumValue",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Description, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__EnumValue",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.IsDeprecated(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(bool)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__EnumValue",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.DeprecationReason(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Field",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Name, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Field",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Description, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Field",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Args, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]introspection.InputValue)
|
||
|
fc.Result = res
|
||
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Field",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Type, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Field",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.IsDeprecated(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(bool)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Field",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.DeprecationReason(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__InputValue",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Name, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__InputValue",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Description, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__InputValue",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Type, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__InputValue",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: false,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.DefaultValue, nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Schema",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Types(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Schema",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.QueryType(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Schema",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.MutationType(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Schema",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.SubscriptionType(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Schema",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Directives(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]introspection.Directive)
|
||
|
fc.Result = res
|
||
|
return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Type",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Kind(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
if !graphql.HasFieldError(ctx, fc) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Type",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Name(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Type",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Description(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(string)
|
||
|
fc.Result = res
|
||
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Type",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field___Type_fields_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Fields(args["includeDeprecated"].(bool)), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]introspection.Field)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Type",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.Interfaces(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Type",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.PossibleTypes(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Type",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
rawArgs := field.ArgumentMap(ec.Variables)
|
||
|
args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
fc.Args = args
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.EnumValues(args["includeDeprecated"].(bool)), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]introspection.EnumValue)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Type",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.InputFields(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.([]introspection.InputValue)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = graphql.Null
|
||
|
}
|
||
|
}()
|
||
|
fc := &graphql.FieldContext{
|
||
|
Object: "__Type",
|
||
|
Field: field,
|
||
|
Args: nil,
|
||
|
IsMethod: true,
|
||
|
}
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||
|
ctx = rctx // use context from middleware stack in children
|
||
|
return obj.OfType(), nil
|
||
|
})
|
||
|
if err != nil {
|
||
|
ec.Error(ctx, err)
|
||
|
return graphql.Null
|
||
|
}
|
||
|
if resTmp == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
res := resTmp.(*introspection.Type)
|
||
|
fc.Result = res
|
||
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
||
|
}
|
||
|
|
||
|
// endregion **************************** field.gotpl *****************************
|
||
|
|
||
|
// region **************************** input.gotpl *****************************
|
||
|
|
||
|
func (ec *executionContext) unmarshalInputLangVersionFilter(ctx context.Context, obj interface{}) (models.LangVersionFilter, error) {
|
||
|
var it models.LangVersionFilter
|
||
|
var asMap = obj.(map[string]interface{})
|
||
|
|
||
|
for k, v := range asMap {
|
||
|
switch k {
|
||
|
case "tag":
|
||
|
var err error
|
||
|
it.Tag, err = ec.unmarshalOLanguageTag2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTagᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "tagNEQ":
|
||
|
var err error
|
||
|
it.TagNEQ, err = ec.unmarshalOLanguageTag2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTagᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "host":
|
||
|
var err error
|
||
|
it.Host, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "hostNEQ":
|
||
|
var err error
|
||
|
it.HostNEQ, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "hostMATCH":
|
||
|
var err error
|
||
|
it.HostMATCH, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "hostIEQ":
|
||
|
var err error
|
||
|
it.HostIEQ, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "offset":
|
||
|
var err error
|
||
|
it.Offset, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "limit":
|
||
|
var err error
|
||
|
it.Limit, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "sort":
|
||
|
var err error
|
||
|
it.Sort, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return it, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalInputPlayerFilter(ctx context.Context, obj interface{}) (models.PlayerFilter, error) {
|
||
|
var it models.PlayerFilter
|
||
|
var asMap = obj.(map[string]interface{})
|
||
|
|
||
|
for k, v := range asMap {
|
||
|
switch k {
|
||
|
case "id":
|
||
|
var err error
|
||
|
it.ID, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "idNEQ":
|
||
|
var err error
|
||
|
it.IdNEQ, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "exist":
|
||
|
var err error
|
||
|
it.Exist, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "name":
|
||
|
var err error
|
||
|
it.Name, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "nameNEQ":
|
||
|
var err error
|
||
|
it.NameNEQ, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "nameMATCH":
|
||
|
var err error
|
||
|
it.NameMATCH, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "nameIEQ":
|
||
|
var err error
|
||
|
it.NameIEQ, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillages":
|
||
|
var err error
|
||
|
it.TotalVillages, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillagesGT":
|
||
|
var err error
|
||
|
it.TotalVillagesGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillagesGTE":
|
||
|
var err error
|
||
|
it.TotalVillagesGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillagesLT":
|
||
|
var err error
|
||
|
it.TotalVillagesLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillagesLTE":
|
||
|
var err error
|
||
|
it.TotalVillagesLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "points":
|
||
|
var err error
|
||
|
it.Points, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsGT":
|
||
|
var err error
|
||
|
it.PointsGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsGTE":
|
||
|
var err error
|
||
|
it.PointsGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsLT":
|
||
|
var err error
|
||
|
it.PointsLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsLTE":
|
||
|
var err error
|
||
|
it.PointsLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rank":
|
||
|
var err error
|
||
|
it.Rank, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankGT":
|
||
|
var err error
|
||
|
it.RankGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankGTE":
|
||
|
var err error
|
||
|
it.RankGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankLT":
|
||
|
var err error
|
||
|
it.RankLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankLTE":
|
||
|
var err error
|
||
|
it.RankLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAtt":
|
||
|
var err error
|
||
|
it.RankAtt, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAttGT":
|
||
|
var err error
|
||
|
it.RankAttGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAttGTE":
|
||
|
var err error
|
||
|
it.RankAttGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAttLT":
|
||
|
var err error
|
||
|
it.RankAttLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAttLTE":
|
||
|
var err error
|
||
|
it.RankAttLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAtt":
|
||
|
var err error
|
||
|
it.ScoreAtt, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAttGT":
|
||
|
var err error
|
||
|
it.ScoreAttGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAttGTE":
|
||
|
var err error
|
||
|
it.ScoreAttGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAttLT":
|
||
|
var err error
|
||
|
it.ScoreAttLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAttLTE":
|
||
|
var err error
|
||
|
it.ScoreAttLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDef":
|
||
|
var err error
|
||
|
it.RankDef, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDefGT":
|
||
|
var err error
|
||
|
it.RankDefGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDefGTE":
|
||
|
var err error
|
||
|
it.RankDefGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDefLT":
|
||
|
var err error
|
||
|
it.RankDefLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDefLTE":
|
||
|
var err error
|
||
|
it.RankDefLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDef":
|
||
|
var err error
|
||
|
it.ScoreDef, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDefGT":
|
||
|
var err error
|
||
|
it.ScoreDefGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDefGTE":
|
||
|
var err error
|
||
|
it.ScoreDefGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDefLT":
|
||
|
var err error
|
||
|
it.ScoreDefLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDefLTE":
|
||
|
var err error
|
||
|
it.ScoreDefLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankSup":
|
||
|
var err error
|
||
|
it.RankSup, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankSupGT":
|
||
|
var err error
|
||
|
it.RankSupGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankSupGTE":
|
||
|
var err error
|
||
|
it.RankSupGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankSupLT":
|
||
|
var err error
|
||
|
it.RankSupLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankSupLTE":
|
||
|
var err error
|
||
|
it.RankSupLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreSup":
|
||
|
var err error
|
||
|
it.ScoreSup, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreSupGT":
|
||
|
var err error
|
||
|
it.ScoreSupGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreSupGTE":
|
||
|
var err error
|
||
|
it.ScoreSupGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreSupLT":
|
||
|
var err error
|
||
|
it.ScoreSupLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreSupLTE":
|
||
|
var err error
|
||
|
it.ScoreSupLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotal":
|
||
|
var err error
|
||
|
it.RankTotal, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotalGT":
|
||
|
var err error
|
||
|
it.RankTotalGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotalGTE":
|
||
|
var err error
|
||
|
it.RankTotalGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotalLT":
|
||
|
var err error
|
||
|
it.RankTotalLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotalLTE":
|
||
|
var err error
|
||
|
it.RankTotalLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotal":
|
||
|
var err error
|
||
|
it.ScoreTotal, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotalGT":
|
||
|
var err error
|
||
|
it.ScoreTotalGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotalGTE":
|
||
|
var err error
|
||
|
it.ScoreTotalGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotalLT":
|
||
|
var err error
|
||
|
it.ScoreTotalLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotalLTE":
|
||
|
var err error
|
||
|
it.ScoreTotalLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "tribeID":
|
||
|
var err error
|
||
|
it.TribeID, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "offset":
|
||
|
var err error
|
||
|
it.Offset, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "limit":
|
||
|
var err error
|
||
|
it.Limit, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "sort":
|
||
|
var err error
|
||
|
it.Sort, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return it, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalInputServerFilter(ctx context.Context, obj interface{}) (models.ServerFilter, error) {
|
||
|
var it models.ServerFilter
|
||
|
var asMap = obj.(map[string]interface{})
|
||
|
|
||
|
for k, v := range asMap {
|
||
|
switch k {
|
||
|
case "id":
|
||
|
var err error
|
||
|
it.ID, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "idNEQ":
|
||
|
var err error
|
||
|
it.IdNEQ, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "key":
|
||
|
var err error
|
||
|
it.Key, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "keyNEQ":
|
||
|
var err error
|
||
|
it.KeyNEQ, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "keyMATCH":
|
||
|
var err error
|
||
|
it.KeyMATCH, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "keyIEQ":
|
||
|
var err error
|
||
|
it.KeyIEQ, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "status":
|
||
|
var err error
|
||
|
it.Status, err = ec.unmarshalOServerStatus2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerStatusᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "statusNEQ":
|
||
|
var err error
|
||
|
it.StatusNEQ, err = ec.unmarshalOServerStatus2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerStatusᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "langVersionTag":
|
||
|
var err error
|
||
|
it.LangVersionTag, err = ec.unmarshalOLanguageTag2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTagᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "langVersionTagNEQ":
|
||
|
var err error
|
||
|
it.LangVersionTagNEQ, err = ec.unmarshalOLanguageTag2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTagᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "offset":
|
||
|
var err error
|
||
|
it.Offset, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "limit":
|
||
|
var err error
|
||
|
it.Limit, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "sort":
|
||
|
var err error
|
||
|
it.Sort, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return it, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalInputTribeFilter(ctx context.Context, obj interface{}) (models.TribeFilter, error) {
|
||
|
var it models.TribeFilter
|
||
|
var asMap = obj.(map[string]interface{})
|
||
|
|
||
|
for k, v := range asMap {
|
||
|
switch k {
|
||
|
case "id":
|
||
|
var err error
|
||
|
it.ID, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "idNEQ":
|
||
|
var err error
|
||
|
it.IdNEQ, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "exist":
|
||
|
var err error
|
||
|
it.Exist, err = ec.unmarshalOBoolean2ᚖbool(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "tag":
|
||
|
var err error
|
||
|
it.Tag, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "tagNEQ":
|
||
|
var err error
|
||
|
it.TagNEQ, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "tagMATCH":
|
||
|
var err error
|
||
|
it.TagMATCH, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "tagIEQ":
|
||
|
var err error
|
||
|
it.TagIEQ, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "name":
|
||
|
var err error
|
||
|
it.Name, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "nameNEQ":
|
||
|
var err error
|
||
|
it.NameNEQ, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "nameMATCH":
|
||
|
var err error
|
||
|
it.NameMATCH, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "nameIEQ":
|
||
|
var err error
|
||
|
it.NameIEQ, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalMembers":
|
||
|
var err error
|
||
|
it.TotalMembers, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalMembersGT":
|
||
|
var err error
|
||
|
it.TotalMembersGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalMembersGTE":
|
||
|
var err error
|
||
|
it.TotalMembersGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalMembersLT":
|
||
|
var err error
|
||
|
it.TotalMembersLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalMembersLTE":
|
||
|
var err error
|
||
|
it.TotalMembersLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillages":
|
||
|
var err error
|
||
|
it.TotalVillages, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillagesGT":
|
||
|
var err error
|
||
|
it.TotalVillagesGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillagesGTE":
|
||
|
var err error
|
||
|
it.TotalVillagesGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillagesLT":
|
||
|
var err error
|
||
|
it.TotalVillagesLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "totalVillagesLTE":
|
||
|
var err error
|
||
|
it.TotalVillagesLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "points":
|
||
|
var err error
|
||
|
it.Points, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsGT":
|
||
|
var err error
|
||
|
it.PointsGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsGTE":
|
||
|
var err error
|
||
|
it.PointsGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsLT":
|
||
|
var err error
|
||
|
it.PointsLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsLTE":
|
||
|
var err error
|
||
|
it.PointsLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "allPoints":
|
||
|
var err error
|
||
|
it.AllPoints, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "allPointsGT":
|
||
|
var err error
|
||
|
it.AllPointsGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "allPointsGTE":
|
||
|
var err error
|
||
|
it.AllPointsGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "allPointsLT":
|
||
|
var err error
|
||
|
it.AllPointsLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "allPointsLTE":
|
||
|
var err error
|
||
|
it.AllPointsLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rank":
|
||
|
var err error
|
||
|
it.Rank, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankGT":
|
||
|
var err error
|
||
|
it.RankGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankGTE":
|
||
|
var err error
|
||
|
it.RankGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankLT":
|
||
|
var err error
|
||
|
it.RankLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankLTE":
|
||
|
var err error
|
||
|
it.RankLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAtt":
|
||
|
var err error
|
||
|
it.RankAtt, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAttGT":
|
||
|
var err error
|
||
|
it.RankAttGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAttGTE":
|
||
|
var err error
|
||
|
it.RankAttGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAttLT":
|
||
|
var err error
|
||
|
it.RankAttLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankAttLTE":
|
||
|
var err error
|
||
|
it.RankAttLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAtt":
|
||
|
var err error
|
||
|
it.ScoreAtt, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAttGT":
|
||
|
var err error
|
||
|
it.ScoreAttGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAttGTE":
|
||
|
var err error
|
||
|
it.ScoreAttGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAttLT":
|
||
|
var err error
|
||
|
it.ScoreAttLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreAttLTE":
|
||
|
var err error
|
||
|
it.ScoreAttLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDef":
|
||
|
var err error
|
||
|
it.RankDef, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDefGT":
|
||
|
var err error
|
||
|
it.RankDefGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDefGTE":
|
||
|
var err error
|
||
|
it.RankDefGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDefLT":
|
||
|
var err error
|
||
|
it.RankDefLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankDefLTE":
|
||
|
var err error
|
||
|
it.RankDefLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDef":
|
||
|
var err error
|
||
|
it.ScoreDef, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDefGT":
|
||
|
var err error
|
||
|
it.ScoreDefGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDefGTE":
|
||
|
var err error
|
||
|
it.ScoreDefGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDefLT":
|
||
|
var err error
|
||
|
it.ScoreDefLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreDefLTE":
|
||
|
var err error
|
||
|
it.ScoreDefLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotal":
|
||
|
var err error
|
||
|
it.RankTotal, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotalGT":
|
||
|
var err error
|
||
|
it.RankTotalGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotalGTE":
|
||
|
var err error
|
||
|
it.RankTotalGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotalLT":
|
||
|
var err error
|
||
|
it.RankTotalLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "rankTotalLTE":
|
||
|
var err error
|
||
|
it.RankTotalLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotal":
|
||
|
var err error
|
||
|
it.ScoreTotal, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotalGT":
|
||
|
var err error
|
||
|
it.ScoreTotalGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotalGTE":
|
||
|
var err error
|
||
|
it.ScoreTotalGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotalLT":
|
||
|
var err error
|
||
|
it.ScoreTotalLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "scoreTotalLTE":
|
||
|
var err error
|
||
|
it.ScoreTotalLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "offset":
|
||
|
var err error
|
||
|
it.Offset, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "limit":
|
||
|
var err error
|
||
|
it.Limit, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "sort":
|
||
|
var err error
|
||
|
it.Sort, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return it, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalInputVillageFilter(ctx context.Context, obj interface{}) (models.VillageFilter, error) {
|
||
|
var it models.VillageFilter
|
||
|
var asMap = obj.(map[string]interface{})
|
||
|
|
||
|
for k, v := range asMap {
|
||
|
switch k {
|
||
|
case "id":
|
||
|
var err error
|
||
|
it.ID, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "idNEQ":
|
||
|
var err error
|
||
|
it.IdNEQ, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "name":
|
||
|
var err error
|
||
|
it.Name, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "nameNEQ":
|
||
|
var err error
|
||
|
it.NameNEQ, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "nameMATCH":
|
||
|
var err error
|
||
|
it.NameMATCH, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "nameIEQ":
|
||
|
var err error
|
||
|
it.NameIEQ, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "points":
|
||
|
var err error
|
||
|
it.Points, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsGT":
|
||
|
var err error
|
||
|
it.PointsGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsGTE":
|
||
|
var err error
|
||
|
it.PointsGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsLT":
|
||
|
var err error
|
||
|
it.PointsLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "pointsLTE":
|
||
|
var err error
|
||
|
it.PointsLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "bonus":
|
||
|
var err error
|
||
|
it.Bonus, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "bonusGT":
|
||
|
var err error
|
||
|
it.BonusGT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "bonusGTE":
|
||
|
var err error
|
||
|
it.BonusGTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "bonusLT":
|
||
|
var err error
|
||
|
it.BonusLT, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "bonusLTE":
|
||
|
var err error
|
||
|
it.BonusLTE, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "playerID":
|
||
|
var err error
|
||
|
it.PlayerID, err = ec.unmarshalOInt2ᚕintᚄ(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "offset":
|
||
|
var err error
|
||
|
it.Offset, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "limit":
|
||
|
var err error
|
||
|
it.Limit, err = ec.unmarshalOInt2int(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
case "sort":
|
||
|
var err error
|
||
|
it.Sort, err = ec.unmarshalOString2string(ctx, v)
|
||
|
if err != nil {
|
||
|
return it, err
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return it, nil
|
||
|
}
|
||
|
|
||
|
// endregion **************************** input.gotpl *****************************
|
||
|
|
||
|
// region ************************** interface.gotpl ***************************
|
||
|
|
||
|
// endregion ************************** interface.gotpl ***************************
|
||
|
|
||
|
// region **************************** object.gotpl ****************************
|
||
|
|
||
|
var langVersionImplementors = []string{"LangVersion"}
|
||
|
|
||
|
func (ec *executionContext) _LangVersion(ctx context.Context, sel ast.SelectionSet, obj *models.LangVersion) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, langVersionImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("LangVersion")
|
||
|
case "tag":
|
||
|
out.Values[i] = ec._LangVersion_tag(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "name":
|
||
|
out.Values[i] = ec._LangVersion_name(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "host":
|
||
|
out.Values[i] = ec._LangVersion_host(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "timezone":
|
||
|
out.Values[i] = ec._LangVersion_timezone(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var langVersionListImplementors = []string{"LangVersionList"}
|
||
|
|
||
|
func (ec *executionContext) _LangVersionList(ctx context.Context, sel ast.SelectionSet, obj *LangVersionList) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, langVersionListImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("LangVersionList")
|
||
|
case "items":
|
||
|
out.Values[i] = ec._LangVersionList_items(ctx, field, obj)
|
||
|
case "total":
|
||
|
out.Values[i] = ec._LangVersionList_total(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var playerImplementors = []string{"Player"}
|
||
|
|
||
|
func (ec *executionContext) _Player(ctx context.Context, sel ast.SelectionSet, obj *models.Player) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, playerImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("Player")
|
||
|
case "id":
|
||
|
out.Values[i] = ec._Player_id(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "name":
|
||
|
out.Values[i] = ec._Player_name(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "totalVillages":
|
||
|
out.Values[i] = ec._Player_totalVillages(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "points":
|
||
|
out.Values[i] = ec._Player_points(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "rank":
|
||
|
out.Values[i] = ec._Player_rank(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "exist":
|
||
|
out.Values[i] = ec._Player_exist(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "rankAtt":
|
||
|
out.Values[i] = ec._Player_rankAtt(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "scoreAtt":
|
||
|
out.Values[i] = ec._Player_scoreAtt(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "rankDef":
|
||
|
out.Values[i] = ec._Player_rankDef(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "scoreDef":
|
||
|
out.Values[i] = ec._Player_scoreDef(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "rankSup":
|
||
|
out.Values[i] = ec._Player_rankSup(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "scoreSup":
|
||
|
out.Values[i] = ec._Player_scoreSup(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "rankTotal":
|
||
|
out.Values[i] = ec._Player_rankTotal(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "scoreTotal":
|
||
|
out.Values[i] = ec._Player_scoreTotal(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "tribe":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Player_tribe(ctx, field, obj)
|
||
|
return res
|
||
|
})
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var playerListImplementors = []string{"PlayerList"}
|
||
|
|
||
|
func (ec *executionContext) _PlayerList(ctx context.Context, sel ast.SelectionSet, obj *PlayerList) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, playerListImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("PlayerList")
|
||
|
case "items":
|
||
|
out.Values[i] = ec._PlayerList_items(ctx, field, obj)
|
||
|
case "total":
|
||
|
out.Values[i] = ec._PlayerList_total(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var queryImplementors = []string{"Query"}
|
||
|
|
||
|
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
|
||
|
|
||
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
||
|
Object: "Query",
|
||
|
})
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("Query")
|
||
|
case "langVersions":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_langVersions(ctx, field)
|
||
|
if res == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
return res
|
||
|
})
|
||
|
case "langVersion":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_langVersion(ctx, field)
|
||
|
return res
|
||
|
})
|
||
|
case "players":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_players(ctx, field)
|
||
|
if res == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
return res
|
||
|
})
|
||
|
case "player":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_player(ctx, field)
|
||
|
return res
|
||
|
})
|
||
|
case "servers":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_servers(ctx, field)
|
||
|
if res == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
return res
|
||
|
})
|
||
|
case "server":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_server(ctx, field)
|
||
|
return res
|
||
|
})
|
||
|
case "tribes":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_tribes(ctx, field)
|
||
|
if res == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
return res
|
||
|
})
|
||
|
case "tribe":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_tribe(ctx, field)
|
||
|
return res
|
||
|
})
|
||
|
case "villages":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_villages(ctx, field)
|
||
|
if res == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
return res
|
||
|
})
|
||
|
case "village":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Query_village(ctx, field)
|
||
|
return res
|
||
|
})
|
||
|
case "__type":
|
||
|
out.Values[i] = ec._Query___type(ctx, field)
|
||
|
case "__schema":
|
||
|
out.Values[i] = ec._Query___schema(ctx, field)
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var serverImplementors = []string{"Server"}
|
||
|
|
||
|
func (ec *executionContext) _Server(ctx context.Context, sel ast.SelectionSet, obj *models.Server) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, serverImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("Server")
|
||
|
case "id":
|
||
|
out.Values[i] = ec._Server_id(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "key":
|
||
|
out.Values[i] = ec._Server_key(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "status":
|
||
|
out.Values[i] = ec._Server_status(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "langVersionTag":
|
||
|
out.Values[i] = ec._Server_langVersionTag(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var serverListImplementors = []string{"ServerList"}
|
||
|
|
||
|
func (ec *executionContext) _ServerList(ctx context.Context, sel ast.SelectionSet, obj *ServerList) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, serverListImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("ServerList")
|
||
|
case "items":
|
||
|
out.Values[i] = ec._ServerList_items(ctx, field, obj)
|
||
|
case "total":
|
||
|
out.Values[i] = ec._ServerList_total(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var tribeImplementors = []string{"Tribe"}
|
||
|
|
||
|
func (ec *executionContext) _Tribe(ctx context.Context, sel ast.SelectionSet, obj *models.Tribe) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, tribeImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("Tribe")
|
||
|
case "id":
|
||
|
out.Values[i] = ec._Tribe_id(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "name":
|
||
|
out.Values[i] = ec._Tribe_name(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "tag":
|
||
|
out.Values[i] = ec._Tribe_tag(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "totalMembers":
|
||
|
out.Values[i] = ec._Tribe_totalMembers(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "totalVillages":
|
||
|
out.Values[i] = ec._Tribe_totalVillages(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "points":
|
||
|
out.Values[i] = ec._Tribe_points(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "allPoints":
|
||
|
out.Values[i] = ec._Tribe_allPoints(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "rank":
|
||
|
out.Values[i] = ec._Tribe_rank(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "exist":
|
||
|
out.Values[i] = ec._Tribe_exist(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "rankAtt":
|
||
|
out.Values[i] = ec._Tribe_rankAtt(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "scoreAtt":
|
||
|
out.Values[i] = ec._Tribe_scoreAtt(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "rankDef":
|
||
|
out.Values[i] = ec._Tribe_rankDef(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "scoreDef":
|
||
|
out.Values[i] = ec._Tribe_scoreDef(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "rankTotal":
|
||
|
out.Values[i] = ec._Tribe_rankTotal(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "scoreTotal":
|
||
|
out.Values[i] = ec._Tribe_scoreTotal(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var tribeListImplementors = []string{"TribeList"}
|
||
|
|
||
|
func (ec *executionContext) _TribeList(ctx context.Context, sel ast.SelectionSet, obj *TribeList) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, tribeListImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("TribeList")
|
||
|
case "items":
|
||
|
out.Values[i] = ec._TribeList_items(ctx, field, obj)
|
||
|
case "total":
|
||
|
out.Values[i] = ec._TribeList_total(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var villageImplementors = []string{"Village"}
|
||
|
|
||
|
func (ec *executionContext) _Village(ctx context.Context, sel ast.SelectionSet, obj *models.Village) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, villageImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("Village")
|
||
|
case "id":
|
||
|
out.Values[i] = ec._Village_id(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "name":
|
||
|
out.Values[i] = ec._Village_name(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "points":
|
||
|
out.Values[i] = ec._Village_points(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "x":
|
||
|
out.Values[i] = ec._Village_x(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "y":
|
||
|
out.Values[i] = ec._Village_y(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "bonus":
|
||
|
out.Values[i] = ec._Village_bonus(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
atomic.AddUint32(&invalids, 1)
|
||
|
}
|
||
|
case "player":
|
||
|
field := field
|
||
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
}
|
||
|
}()
|
||
|
res = ec._Village_player(ctx, field, obj)
|
||
|
return res
|
||
|
})
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var villageListImplementors = []string{"VillageList"}
|
||
|
|
||
|
func (ec *executionContext) _VillageList(ctx context.Context, sel ast.SelectionSet, obj *VillageList) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, villageListImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("VillageList")
|
||
|
case "items":
|
||
|
out.Values[i] = ec._VillageList_items(ctx, field, obj)
|
||
|
case "total":
|
||
|
out.Values[i] = ec._VillageList_total(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var __DirectiveImplementors = []string{"__Directive"}
|
||
|
|
||
|
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("__Directive")
|
||
|
case "name":
|
||
|
out.Values[i] = ec.___Directive_name(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "description":
|
||
|
out.Values[i] = ec.___Directive_description(ctx, field, obj)
|
||
|
case "locations":
|
||
|
out.Values[i] = ec.___Directive_locations(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "args":
|
||
|
out.Values[i] = ec.___Directive_args(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var __EnumValueImplementors = []string{"__EnumValue"}
|
||
|
|
||
|
func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("__EnumValue")
|
||
|
case "name":
|
||
|
out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "description":
|
||
|
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
|
||
|
case "isDeprecated":
|
||
|
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "deprecationReason":
|
||
|
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var __FieldImplementors = []string{"__Field"}
|
||
|
|
||
|
func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("__Field")
|
||
|
case "name":
|
||
|
out.Values[i] = ec.___Field_name(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "description":
|
||
|
out.Values[i] = ec.___Field_description(ctx, field, obj)
|
||
|
case "args":
|
||
|
out.Values[i] = ec.___Field_args(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "type":
|
||
|
out.Values[i] = ec.___Field_type(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "isDeprecated":
|
||
|
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "deprecationReason":
|
||
|
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var __InputValueImplementors = []string{"__InputValue"}
|
||
|
|
||
|
func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("__InputValue")
|
||
|
case "name":
|
||
|
out.Values[i] = ec.___InputValue_name(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "description":
|
||
|
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
|
||
|
case "type":
|
||
|
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "defaultValue":
|
||
|
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var __SchemaImplementors = []string{"__Schema"}
|
||
|
|
||
|
func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("__Schema")
|
||
|
case "types":
|
||
|
out.Values[i] = ec.___Schema_types(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "queryType":
|
||
|
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "mutationType":
|
||
|
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
|
||
|
case "subscriptionType":
|
||
|
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
|
||
|
case "directives":
|
||
|
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
var __TypeImplementors = []string{"__Type"}
|
||
|
|
||
|
func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
|
||
|
fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
|
||
|
|
||
|
out := graphql.NewFieldSet(fields)
|
||
|
var invalids uint32
|
||
|
for i, field := range fields {
|
||
|
switch field.Name {
|
||
|
case "__typename":
|
||
|
out.Values[i] = graphql.MarshalString("__Type")
|
||
|
case "kind":
|
||
|
out.Values[i] = ec.___Type_kind(ctx, field, obj)
|
||
|
if out.Values[i] == graphql.Null {
|
||
|
invalids++
|
||
|
}
|
||
|
case "name":
|
||
|
out.Values[i] = ec.___Type_name(ctx, field, obj)
|
||
|
case "description":
|
||
|
out.Values[i] = ec.___Type_description(ctx, field, obj)
|
||
|
case "fields":
|
||
|
out.Values[i] = ec.___Type_fields(ctx, field, obj)
|
||
|
case "interfaces":
|
||
|
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
|
||
|
case "possibleTypes":
|
||
|
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
|
||
|
case "enumValues":
|
||
|
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
|
||
|
case "inputFields":
|
||
|
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
|
||
|
case "ofType":
|
||
|
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
|
||
|
default:
|
||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||
|
}
|
||
|
}
|
||
|
out.Dispatch()
|
||
|
if invalids > 0 {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
// endregion **************************** object.gotpl ****************************
|
||
|
|
||
|
// region ***************************** type.gotpl *****************************
|
||
|
|
||
|
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
||
|
return graphql.UnmarshalBoolean(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
||
|
res := graphql.MarshalBoolean(v)
|
||
|
if res == graphql.Null {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
}
|
||
|
return res
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalNBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
|
||
|
if v == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
res, err := ec.unmarshalNBoolean2bool(ctx, v)
|
||
|
return &res, err
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec.marshalNBoolean2bool(ctx, sel, *v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {
|
||
|
return graphql.UnmarshalInt(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
|
||
|
res := graphql.MarshalInt(v)
|
||
|
if res == graphql.Null {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
}
|
||
|
return res
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNLangVersion2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersion(ctx context.Context, sel ast.SelectionSet, v models.LangVersion) graphql.Marshaler {
|
||
|
return ec._LangVersion(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNLangVersion2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersion(ctx context.Context, sel ast.SelectionSet, v *models.LangVersion) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._LangVersion(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNLangVersionList2githubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐLangVersionList(ctx context.Context, sel ast.SelectionSet, v LangVersionList) graphql.Marshaler {
|
||
|
return ec._LangVersionList(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNLangVersionList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐLangVersionList(ctx context.Context, sel ast.SelectionSet, v *LangVersionList) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._LangVersionList(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalNLanguageTag2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTag(ctx context.Context, v interface{}) (models.LanguageTag, error) {
|
||
|
var res models.LanguageTag
|
||
|
return res, res.UnmarshalGQL(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNLanguageTag2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTag(ctx context.Context, sel ast.SelectionSet, v models.LanguageTag) graphql.Marshaler {
|
||
|
return v
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNPlayer2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayer(ctx context.Context, sel ast.SelectionSet, v models.Player) graphql.Marshaler {
|
||
|
return ec._Player(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNPlayer2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayer(ctx context.Context, sel ast.SelectionSet, v *models.Player) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._Player(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNPlayerList2githubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐPlayerList(ctx context.Context, sel ast.SelectionSet, v PlayerList) graphql.Marshaler {
|
||
|
return ec._PlayerList(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNPlayerList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐPlayerList(ctx context.Context, sel ast.SelectionSet, v *PlayerList) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._PlayerList(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNServer2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServer(ctx context.Context, sel ast.SelectionSet, v models.Server) graphql.Marshaler {
|
||
|
return ec._Server(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNServer2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServer(ctx context.Context, sel ast.SelectionSet, v *models.Server) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._Server(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNServerList2githubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐServerList(ctx context.Context, sel ast.SelectionSet, v ServerList) graphql.Marshaler {
|
||
|
return ec._ServerList(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNServerList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐServerList(ctx context.Context, sel ast.SelectionSet, v *ServerList) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._ServerList(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalNServerStatus2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerStatus(ctx context.Context, v interface{}) (models.ServerStatus, error) {
|
||
|
var res models.ServerStatus
|
||
|
return res, res.UnmarshalGQL(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNServerStatus2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerStatus(ctx context.Context, sel ast.SelectionSet, v models.ServerStatus) graphql.Marshaler {
|
||
|
return v
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
|
||
|
return graphql.UnmarshalString(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
||
|
res := graphql.MarshalString(v)
|
||
|
if res == graphql.Null {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
}
|
||
|
return res
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNTribe2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribe(ctx context.Context, sel ast.SelectionSet, v models.Tribe) graphql.Marshaler {
|
||
|
return ec._Tribe(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNTribe2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribe(ctx context.Context, sel ast.SelectionSet, v *models.Tribe) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._Tribe(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNTribeList2githubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐTribeList(ctx context.Context, sel ast.SelectionSet, v TribeList) graphql.Marshaler {
|
||
|
return ec._TribeList(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNTribeList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐTribeList(ctx context.Context, sel ast.SelectionSet, v *TribeList) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._TribeList(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNVillage2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillage(ctx context.Context, sel ast.SelectionSet, v models.Village) graphql.Marshaler {
|
||
|
return ec._Village(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNVillage2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillage(ctx context.Context, sel ast.SelectionSet, v *models.Village) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._Village(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNVillageList2githubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐVillageList(ctx context.Context, sel ast.SelectionSet, v VillageList) graphql.Marshaler {
|
||
|
return ec._VillageList(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalNVillageList2ᚖgithubᚗcomᚋtribalwarshelpᚋapiᚋgraphqlᚋgeneratedᚐVillageList(ctx context.Context, sel ast.SelectionSet, v *VillageList) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._VillageList(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
|
||
|
return ec.___Directive(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
|
||
|
ret := make(graphql.Array, len(v))
|
||
|
var wg sync.WaitGroup
|
||
|
isLen1 := len(v) == 1
|
||
|
if !isLen1 {
|
||
|
wg.Add(len(v))
|
||
|
}
|
||
|
for i := range v {
|
||
|
i := i
|
||
|
fc := &graphql.FieldContext{
|
||
|
Index: &i,
|
||
|
Result: &v[i],
|
||
|
}
|
||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||
|
f := func(i int) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = nil
|
||
|
}
|
||
|
}()
|
||
|
if !isLen1 {
|
||
|
defer wg.Done()
|
||
|
}
|
||
|
ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
|
||
|
return graphql.UnmarshalString(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
||
|
res := graphql.MarshalString(v)
|
||
|
if res == graphql.Null {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
}
|
||
|
return res
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
||
|
var vSlice []interface{}
|
||
|
if v != nil {
|
||
|
if tmp1, ok := v.([]interface{}); ok {
|
||
|
vSlice = tmp1
|
||
|
} else {
|
||
|
vSlice = []interface{}{v}
|
||
|
}
|
||
|
}
|
||
|
var err error
|
||
|
res := make([]string, len(vSlice))
|
||
|
for i := range vSlice {
|
||
|
res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
return res, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
||
|
ret := make(graphql.Array, len(v))
|
||
|
var wg sync.WaitGroup
|
||
|
isLen1 := len(v) == 1
|
||
|
if !isLen1 {
|
||
|
wg.Add(len(v))
|
||
|
}
|
||
|
for i := range v {
|
||
|
i := i
|
||
|
fc := &graphql.FieldContext{
|
||
|
Index: &i,
|
||
|
Result: &v[i],
|
||
|
}
|
||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||
|
f := func(i int) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = nil
|
||
|
}
|
||
|
}()
|
||
|
if !isLen1 {
|
||
|
defer wg.Done()
|
||
|
}
|
||
|
ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
|
||
|
return ec.___EnumValue(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
|
||
|
return ec.___Field(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
|
||
|
return ec.___InputValue(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
||
|
ret := make(graphql.Array, len(v))
|
||
|
var wg sync.WaitGroup
|
||
|
isLen1 := len(v) == 1
|
||
|
if !isLen1 {
|
||
|
wg.Add(len(v))
|
||
|
}
|
||
|
for i := range v {
|
||
|
i := i
|
||
|
fc := &graphql.FieldContext{
|
||
|
Index: &i,
|
||
|
Result: &v[i],
|
||
|
}
|
||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||
|
f := func(i int) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = nil
|
||
|
}
|
||
|
}()
|
||
|
if !isLen1 {
|
||
|
defer wg.Done()
|
||
|
}
|
||
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
|
||
|
return ec.___Type(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
||
|
ret := make(graphql.Array, len(v))
|
||
|
var wg sync.WaitGroup
|
||
|
isLen1 := len(v) == 1
|
||
|
if !isLen1 {
|
||
|
wg.Add(len(v))
|
||
|
}
|
||
|
for i := range v {
|
||
|
i := i
|
||
|
fc := &graphql.FieldContext{
|
||
|
Index: &i,
|
||
|
Result: &v[i],
|
||
|
}
|
||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||
|
f := func(i int) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = nil
|
||
|
}
|
||
|
}()
|
||
|
if !isLen1 {
|
||
|
defer wg.Done()
|
||
|
}
|
||
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec.___Type(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
|
||
|
return graphql.UnmarshalString(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
||
|
res := graphql.MarshalString(v)
|
||
|
if res == graphql.Null {
|
||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||
|
ec.Errorf(ctx, "must not be null")
|
||
|
}
|
||
|
}
|
||
|
return res
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
||
|
return graphql.UnmarshalBoolean(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
||
|
return graphql.MarshalBoolean(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
|
||
|
if v == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
res, err := ec.unmarshalOBoolean2bool(ctx, v)
|
||
|
return &res, err
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec.marshalOBoolean2bool(ctx, sel, *v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOInt2int(ctx context.Context, v interface{}) (int, error) {
|
||
|
return graphql.UnmarshalInt(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
|
||
|
return graphql.MarshalInt(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOInt2ᚕintᚄ(ctx context.Context, v interface{}) ([]int, error) {
|
||
|
var vSlice []interface{}
|
||
|
if v != nil {
|
||
|
if tmp1, ok := v.([]interface{}); ok {
|
||
|
vSlice = tmp1
|
||
|
} else {
|
||
|
vSlice = []interface{}{v}
|
||
|
}
|
||
|
}
|
||
|
var err error
|
||
|
res := make([]int, len(vSlice))
|
||
|
for i := range vSlice {
|
||
|
res[i], err = ec.unmarshalNInt2int(ctx, vSlice[i])
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
return res, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOInt2ᚕintᚄ(ctx context.Context, sel ast.SelectionSet, v []int) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
ret := make(graphql.Array, len(v))
|
||
|
for i := range v {
|
||
|
ret[i] = ec.marshalNInt2int(ctx, sel, v[i])
|
||
|
}
|
||
|
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOLangVersion2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersion(ctx context.Context, sel ast.SelectionSet, v models.LangVersion) graphql.Marshaler {
|
||
|
return ec._LangVersion(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOLangVersion2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersionᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.LangVersion) 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.marshalNLangVersion2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersion(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOLangVersion2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersion(ctx context.Context, sel ast.SelectionSet, v *models.LangVersion) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._LangVersion(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOLangVersionFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersionFilter(ctx context.Context, v interface{}) (models.LangVersionFilter, error) {
|
||
|
return ec.unmarshalInputLangVersionFilter(ctx, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOLangVersionFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersionFilter(ctx context.Context, v interface{}) (*models.LangVersionFilter, error) {
|
||
|
if v == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
res, err := ec.unmarshalOLangVersionFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLangVersionFilter(ctx, v)
|
||
|
return &res, err
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOLanguageTag2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTagᚄ(ctx context.Context, v interface{}) ([]models.LanguageTag, error) {
|
||
|
var vSlice []interface{}
|
||
|
if v != nil {
|
||
|
if tmp1, ok := v.([]interface{}); ok {
|
||
|
vSlice = tmp1
|
||
|
} else {
|
||
|
vSlice = []interface{}{v}
|
||
|
}
|
||
|
}
|
||
|
var err error
|
||
|
res := make([]models.LanguageTag, len(vSlice))
|
||
|
for i := range vSlice {
|
||
|
res[i], err = ec.unmarshalNLanguageTag2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTag(ctx, vSlice[i])
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
return res, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOLanguageTag2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTagᚄ(ctx context.Context, sel ast.SelectionSet, v []models.LanguageTag) 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.marshalNLanguageTag2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐLanguageTag(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOPlayer2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayer(ctx context.Context, sel ast.SelectionSet, v models.Player) graphql.Marshaler {
|
||
|
return ec._Player(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOPlayer2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayerᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Player) 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.marshalNPlayer2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayer(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOPlayer2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayer(ctx context.Context, sel ast.SelectionSet, v *models.Player) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._Player(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOPlayerFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayerFilter(ctx context.Context, v interface{}) (models.PlayerFilter, error) {
|
||
|
return ec.unmarshalInputPlayerFilter(ctx, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOPlayerFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayerFilter(ctx context.Context, v interface{}) (*models.PlayerFilter, error) {
|
||
|
if v == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
res, err := ec.unmarshalOPlayerFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐPlayerFilter(ctx, v)
|
||
|
return &res, err
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOServer2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServer(ctx context.Context, sel ast.SelectionSet, v models.Server) graphql.Marshaler {
|
||
|
return ec._Server(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOServer2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Server) 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.marshalNServer2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServer(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOServer2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServer(ctx context.Context, sel ast.SelectionSet, v *models.Server) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._Server(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOServerFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerFilter(ctx context.Context, v interface{}) (models.ServerFilter, error) {
|
||
|
return ec.unmarshalInputServerFilter(ctx, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOServerFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerFilter(ctx context.Context, v interface{}) (*models.ServerFilter, error) {
|
||
|
if v == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
res, err := ec.unmarshalOServerFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerFilter(ctx, v)
|
||
|
return &res, err
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOServerStatus2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerStatusᚄ(ctx context.Context, v interface{}) ([]models.ServerStatus, error) {
|
||
|
var vSlice []interface{}
|
||
|
if v != nil {
|
||
|
if tmp1, ok := v.([]interface{}); ok {
|
||
|
vSlice = tmp1
|
||
|
} else {
|
||
|
vSlice = []interface{}{v}
|
||
|
}
|
||
|
}
|
||
|
var err error
|
||
|
res := make([]models.ServerStatus, len(vSlice))
|
||
|
for i := range vSlice {
|
||
|
res[i], err = ec.unmarshalNServerStatus2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerStatus(ctx, vSlice[i])
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
}
|
||
|
return res, nil
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOServerStatus2ᚕgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerStatusᚄ(ctx context.Context, sel ast.SelectionSet, v []models.ServerStatus) 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.marshalNServerStatus2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐServerStatus(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
|
||
|
return graphql.UnmarshalString(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
||
|
return graphql.MarshalString(v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
||
|
var vSlice []interface{}
|
||
|
if v != nil {
|
||
|
if tmp1, ok := v.([]interface{}); ok {
|
||
|
vSlice = tmp1
|
||
|
} else {
|
||
|
vSlice = []interface{}{v}
|
||
|
}
|
||
|
}
|
||
|
var err error
|
||
|
res := make([]string, len(vSlice))
|
||
|
for i := range vSlice {
|
||
|
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])
|
||
|
}
|
||
|
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
|
||
|
if v == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
res, err := ec.unmarshalOString2string(ctx, v)
|
||
|
return &res, err
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec.marshalOString2string(ctx, sel, *v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOTribe2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribe(ctx context.Context, sel ast.SelectionSet, v models.Tribe) graphql.Marshaler {
|
||
|
return ec._Tribe(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOTribe2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Tribe) 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.marshalNTribe2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribe(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOTribe2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribe(ctx context.Context, sel ast.SelectionSet, v *models.Tribe) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._Tribe(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOTribeFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribeFilter(ctx context.Context, v interface{}) (models.TribeFilter, error) {
|
||
|
return ec.unmarshalInputTribeFilter(ctx, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOTribeFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribeFilter(ctx context.Context, v interface{}) (*models.TribeFilter, error) {
|
||
|
if v == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
res, err := ec.unmarshalOTribeFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐTribeFilter(ctx, v)
|
||
|
return &res, err
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOVillage2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillage(ctx context.Context, sel ast.SelectionSet, v models.Village) graphql.Marshaler {
|
||
|
return ec._Village(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOVillage2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillageᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.Village) 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.marshalNVillage2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillage(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalOVillage2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillage(ctx context.Context, sel ast.SelectionSet, v *models.Village) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec._Village(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOVillageFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillageFilter(ctx context.Context, v interface{}) (models.VillageFilter, error) {
|
||
|
return ec.unmarshalInputVillageFilter(ctx, v)
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) unmarshalOVillageFilter2ᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillageFilter(ctx context.Context, v interface{}) (*models.VillageFilter, error) {
|
||
|
if v == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
res, err := ec.unmarshalOVillageFilter2githubᚗcomᚋtribalwarshelpᚋsharedᚋmodelsᚐVillageFilter(ctx, v)
|
||
|
return &res, err
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
ret := make(graphql.Array, len(v))
|
||
|
var wg sync.WaitGroup
|
||
|
isLen1 := len(v) == 1
|
||
|
if !isLen1 {
|
||
|
wg.Add(len(v))
|
||
|
}
|
||
|
for i := range v {
|
||
|
i := i
|
||
|
fc := &graphql.FieldContext{
|
||
|
Index: &i,
|
||
|
Result: &v[i],
|
||
|
}
|
||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||
|
f := func(i int) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = nil
|
||
|
}
|
||
|
}()
|
||
|
if !isLen1 {
|
||
|
defer wg.Done()
|
||
|
}
|
||
|
ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
ret := make(graphql.Array, len(v))
|
||
|
var wg sync.WaitGroup
|
||
|
isLen1 := len(v) == 1
|
||
|
if !isLen1 {
|
||
|
wg.Add(len(v))
|
||
|
}
|
||
|
for i := range v {
|
||
|
i := i
|
||
|
fc := &graphql.FieldContext{
|
||
|
Index: &i,
|
||
|
Result: &v[i],
|
||
|
}
|
||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||
|
f := func(i int) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = nil
|
||
|
}
|
||
|
}()
|
||
|
if !isLen1 {
|
||
|
defer wg.Done()
|
||
|
}
|
||
|
ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
ret := make(graphql.Array, len(v))
|
||
|
var wg sync.WaitGroup
|
||
|
isLen1 := len(v) == 1
|
||
|
if !isLen1 {
|
||
|
wg.Add(len(v))
|
||
|
}
|
||
|
for i := range v {
|
||
|
i := i
|
||
|
fc := &graphql.FieldContext{
|
||
|
Index: &i,
|
||
|
Result: &v[i],
|
||
|
}
|
||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||
|
f := func(i int) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = nil
|
||
|
}
|
||
|
}()
|
||
|
if !isLen1 {
|
||
|
defer wg.Done()
|
||
|
}
|
||
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalO__Schema2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler {
|
||
|
return ec.___Schema(ctx, sel, &v)
|
||
|
}
|
||
|
|
||
|
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__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) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
ret := make(graphql.Array, len(v))
|
||
|
var wg sync.WaitGroup
|
||
|
isLen1 := len(v) == 1
|
||
|
if !isLen1 {
|
||
|
wg.Add(len(v))
|
||
|
}
|
||
|
for i := range v {
|
||
|
i := i
|
||
|
fc := &graphql.FieldContext{
|
||
|
Index: &i,
|
||
|
Result: &v[i],
|
||
|
}
|
||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||
|
f := func(i int) {
|
||
|
defer func() {
|
||
|
if r := recover(); r != nil {
|
||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||
|
ret = nil
|
||
|
}
|
||
|
}()
|
||
|
if !isLen1 {
|
||
|
defer wg.Done()
|
||
|
}
|
||
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
||
|
}
|
||
|
if isLen1 {
|
||
|
f(i)
|
||
|
} else {
|
||
|
go f(i)
|
||
|
}
|
||
|
|
||
|
}
|
||
|
wg.Wait()
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
||
|
if v == nil {
|
||
|
return graphql.Null
|
||
|
}
|
||
|
return ec.___Type(ctx, sel, v)
|
||
|
}
|
||
|
|
||
|
// endregion ***************************** type.gotpl *****************************
|