Merge pull request #29 from tribalwarshelp/fix/add-missing-id-fields

Fix: add missing id fields
This commit is contained in:
Dawid Wysokiński 2021-07-05 18:50:16 +02:00 committed by GitHub
commit f56ab64862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 350 additions and 0 deletions

View File

@ -94,6 +94,7 @@ type ComplexityRoot struct {
DailyPlayerStatsRecord struct { DailyPlayerStatsRecord struct {
CreateDate func(childComplexity int) int CreateDate func(childComplexity int) int
ID func(childComplexity int) int
Player func(childComplexity int) int Player func(childComplexity int) int
Points func(childComplexity int) int Points func(childComplexity int) int
Rank func(childComplexity int) int Rank func(childComplexity int) int
@ -117,6 +118,7 @@ type ComplexityRoot struct {
AllPoints func(childComplexity int) int AllPoints func(childComplexity int) int
CreateDate func(childComplexity int) int CreateDate func(childComplexity int) int
Dominance func(childComplexity int) int Dominance func(childComplexity int) int
ID func(childComplexity int) int
Members func(childComplexity int) int Members func(childComplexity int) int
Points func(childComplexity int) int Points func(childComplexity int) int
Rank func(childComplexity int) int Rank func(childComplexity int) int
@ -132,6 +134,7 @@ type ComplexityRoot struct {
Ennoblement struct { Ennoblement struct {
EnnobledAt func(childComplexity int) int EnnobledAt func(childComplexity int) int
ID func(childComplexity int) int
NewOwner func(childComplexity int) int NewOwner func(childComplexity int) int
NewOwnerTribe func(childComplexity int) int NewOwnerTribe func(childComplexity int) int
OldOwner func(childComplexity int) int OldOwner func(childComplexity int) int
@ -212,6 +215,7 @@ type ComplexityRoot struct {
PlayerHistoryRecord struct { PlayerHistoryRecord struct {
CreateDate func(childComplexity int) int CreateDate func(childComplexity int) int
ID func(childComplexity int) int
Player func(childComplexity int) int Player func(childComplexity int) int
Points func(childComplexity int) int Points func(childComplexity int) int
Rank func(childComplexity int) int Rank func(childComplexity int) int
@ -441,6 +445,7 @@ type ComplexityRoot struct {
BarbarianVillages func(childComplexity int) int BarbarianVillages func(childComplexity int) int
BonusVillages func(childComplexity int) int BonusVillages func(childComplexity int) int
CreateDate func(childComplexity int) int CreateDate func(childComplexity int) int
ID func(childComplexity int) int
InactivePlayers func(childComplexity int) int InactivePlayers func(childComplexity int) int
InactiveTribes func(childComplexity int) int InactiveTribes func(childComplexity int) int
PlayerVillages func(childComplexity int) int PlayerVillages func(childComplexity int) int
@ -478,6 +483,7 @@ type ComplexityRoot struct {
TribeChangeRecord struct { TribeChangeRecord struct {
CreatedAt func(childComplexity int) int CreatedAt func(childComplexity int) int
ID func(childComplexity int) int
NewTribe func(childComplexity int) int NewTribe func(childComplexity int) int
OldTribe func(childComplexity int) int OldTribe func(childComplexity int) int
Player func(childComplexity int) int Player func(childComplexity int) int
@ -497,6 +503,7 @@ type ComplexityRoot struct {
AllPoints func(childComplexity int) int AllPoints func(childComplexity int) int
CreateDate func(childComplexity int) int CreateDate func(childComplexity int) int
Dominance func(childComplexity int) int Dominance func(childComplexity int) int
ID func(childComplexity int) int
Points func(childComplexity int) int Points func(childComplexity int) int
Rank func(childComplexity int) int Rank func(childComplexity int) int
RankAtt func(childComplexity int) int RankAtt func(childComplexity int) int
@ -868,6 +875,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.DailyPlayerStatsRecord.CreateDate(childComplexity), true return e.complexity.DailyPlayerStatsRecord.CreateDate(childComplexity), true
case "DailyPlayerStatsRecord.id":
if e.complexity.DailyPlayerStatsRecord.ID == nil {
break
}
return e.complexity.DailyPlayerStatsRecord.ID(childComplexity), true
case "DailyPlayerStatsRecord.player": case "DailyPlayerStatsRecord.player":
if e.complexity.DailyPlayerStatsRecord.Player == nil { if e.complexity.DailyPlayerStatsRecord.Player == nil {
break break
@ -987,6 +1001,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.DailyTribeStatsRecord.Dominance(childComplexity), true return e.complexity.DailyTribeStatsRecord.Dominance(childComplexity), true
case "DailyTribeStatsRecord.id":
if e.complexity.DailyTribeStatsRecord.ID == nil {
break
}
return e.complexity.DailyTribeStatsRecord.ID(childComplexity), true
case "DailyTribeStatsRecord.members": case "DailyTribeStatsRecord.members":
if e.complexity.DailyTribeStatsRecord.Members == nil { if e.complexity.DailyTribeStatsRecord.Members == nil {
break break
@ -1071,6 +1092,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Ennoblement.EnnobledAt(childComplexity), true return e.complexity.Ennoblement.EnnobledAt(childComplexity), true
case "Ennoblement.id":
if e.complexity.Ennoblement.ID == nil {
break
}
return e.complexity.Ennoblement.ID(childComplexity), true
case "Ennoblement.newOwner": case "Ennoblement.newOwner":
if e.complexity.Ennoblement.NewOwner == nil { if e.complexity.Ennoblement.NewOwner == nil {
break break
@ -1463,6 +1491,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.PlayerHistoryRecord.CreateDate(childComplexity), true return e.complexity.PlayerHistoryRecord.CreateDate(childComplexity), true
case "PlayerHistoryRecord.id":
if e.complexity.PlayerHistoryRecord.ID == nil {
break
}
return e.complexity.PlayerHistoryRecord.ID(childComplexity), true
case "PlayerHistoryRecord.player": case "PlayerHistoryRecord.player":
if e.complexity.PlayerHistoryRecord.Player == nil { if e.complexity.PlayerHistoryRecord.Player == nil {
break break
@ -2720,6 +2755,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.ServerStatsRecord.CreateDate(childComplexity), true return e.complexity.ServerStatsRecord.CreateDate(childComplexity), true
case "ServerStatsRecord.id":
if e.complexity.ServerStatsRecord.ID == nil {
break
}
return e.complexity.ServerStatsRecord.ID(childComplexity), true
case "ServerStatsRecord.inactivePlayers": case "ServerStatsRecord.inactivePlayers":
if e.complexity.ServerStatsRecord.InactivePlayers == nil { if e.complexity.ServerStatsRecord.InactivePlayers == nil {
break break
@ -2937,6 +2979,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.TribeChangeRecord.CreatedAt(childComplexity), true return e.complexity.TribeChangeRecord.CreatedAt(childComplexity), true
case "TribeChangeRecord.id":
if e.complexity.TribeChangeRecord.ID == nil {
break
}
return e.complexity.TribeChangeRecord.ID(childComplexity), true
case "TribeChangeRecord.newTribe": case "TribeChangeRecord.newTribe":
if e.complexity.TribeChangeRecord.NewTribe == nil { if e.complexity.TribeChangeRecord.NewTribe == nil {
break break
@ -3007,6 +3056,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.TribeHistoryRecord.Dominance(childComplexity), true return e.complexity.TribeHistoryRecord.Dominance(childComplexity), true
case "TribeHistoryRecord.id":
if e.complexity.TribeHistoryRecord.ID == nil {
break
}
return e.complexity.TribeHistoryRecord.ID(childComplexity), true
case "TribeHistoryRecord.points": case "TribeHistoryRecord.points":
if e.complexity.TribeHistoryRecord.Points == nil { if e.complexity.TribeHistoryRecord.Points == nil {
break break
@ -3436,6 +3492,7 @@ type BuildingConfig {
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "schema/daily_player_stats.graphql", Input: `type DailyPlayerStatsRecord { {Name: "schema/daily_player_stats.graphql", Input: `type DailyPlayerStatsRecord {
id: Int!
player: Player @goField(forceResolver: true) player: Player @goField(forceResolver: true)
villages: Int! villages: Int!
points: Int! points: Int!
@ -3479,6 +3536,7 @@ extend type Query {
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "schema/daily_tribe_stats.graphql", Input: `type DailyTribeStatsRecord { {Name: "schema/daily_tribe_stats.graphql", Input: `type DailyTribeStatsRecord {
id: Int!
tribe: Tribe @goField(forceResolver: true) tribe: Tribe @goField(forceResolver: true)
members: Int! members: Int!
villages: Int! villages: Int!
@ -3527,6 +3585,7 @@ extend type Query {
name: String name: String
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION`, BuiltIn: false}, ) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION`, BuiltIn: false},
{Name: "schema/ennoblements.graphql", Input: `type Ennoblement { {Name: "schema/ennoblements.graphql", Input: `type Ennoblement {
id: Int!
village: Village @goField(forceResolver: true) village: Village @goField(forceResolver: true)
newOwner: Player @goField(forceResolver: true) newOwner: Player @goField(forceResolver: true)
newOwnerTribe: Tribe @goField(forceResolver: true) newOwnerTribe: Tribe @goField(forceResolver: true)
@ -3768,6 +3827,7 @@ extend type Query {
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "schema/player_history.graphql", Input: `type PlayerHistoryRecord { {Name: "schema/player_history.graphql", Input: `type PlayerHistoryRecord {
id: Int!
player: Player @goField(forceResolver: true) player: Player @goField(forceResolver: true)
totalVillages: Int! totalVillages: Int!
points: Int! points: Int!
@ -4017,6 +4077,7 @@ type ServerConfig {
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "schema/server_stats.graphql", Input: `type ServerStatsRecord { {Name: "schema/server_stats.graphql", Input: `type ServerStatsRecord {
id: Int!
activePlayers: Int! activePlayers: Int!
inactivePlayers: Int! inactivePlayers: Int!
players: Int! players: Int!
@ -4230,6 +4291,7 @@ extend type Query {
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "schema/tribe_change.graphql", Input: `type TribeChangeRecord { {Name: "schema/tribe_change.graphql", Input: `type TribeChangeRecord {
id: Int!
player: Player @goField(forceResolver: true) player: Player @goField(forceResolver: true)
oldTribe: Tribe @goField(forceResolver: true) oldTribe: Tribe @goField(forceResolver: true)
newTribe: Tribe @goField(forceResolver: true) newTribe: Tribe @goField(forceResolver: true)
@ -4279,6 +4341,7 @@ extend type Query {
} }
`, BuiltIn: false}, `, BuiltIn: false},
{Name: "schema/tribe_history.graphql", Input: `type TribeHistoryRecord { {Name: "schema/tribe_history.graphql", Input: `type TribeHistoryRecord {
id: Int!
tribe: Tribe @goField(forceResolver: true) tribe: Tribe @goField(forceResolver: true)
totalVillages: Int! totalVillages: Int!
totalMembers: Int! totalMembers: Int!
@ -6433,6 +6496,41 @@ func (ec *executionContext) _DailyPlayerStats_items(ctx context.Context, field g
return ec.marshalODailyPlayerStatsRecord2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋtwᚋtwmodelᚐDailyPlayerStatsᚄ(ctx, field.Selections, res) return ec.marshalODailyPlayerStatsRecord2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋtwᚋtwmodelᚐDailyPlayerStatsᚄ(ctx, field.Selections, res)
} }
func (ec *executionContext) _DailyPlayerStatsRecord_id(ctx context.Context, field graphql.CollectedField, obj *twmodel.DailyPlayerStats) (ret graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
fc := &graphql.FieldContext{
Object: "DailyPlayerStatsRecord",
Field: field,
Args: nil,
IsMethod: false,
IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.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) _DailyPlayerStatsRecord_player(ctx context.Context, field graphql.CollectedField, obj *twmodel.DailyPlayerStats) (ret graphql.Marshaler) { func (ec *executionContext) _DailyPlayerStatsRecord_player(ctx context.Context, field graphql.CollectedField, obj *twmodel.DailyPlayerStats) (ret graphql.Marshaler) {
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
@ -6952,6 +7050,41 @@ func (ec *executionContext) _DailyTribeStats_items(ctx context.Context, field gr
return ec.marshalODailyTribeStatsRecord2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋtwᚋtwmodelᚐDailyTribeStatsᚄ(ctx, field.Selections, res) return ec.marshalODailyTribeStatsRecord2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋtwᚋtwmodelᚐDailyTribeStatsᚄ(ctx, field.Selections, res)
} }
func (ec *executionContext) _DailyTribeStatsRecord_id(ctx context.Context, field graphql.CollectedField, obj *twmodel.DailyTribeStats) (ret graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
fc := &graphql.FieldContext{
Object: "DailyTribeStatsRecord",
Field: field,
Args: nil,
IsMethod: false,
IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.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) _DailyTribeStatsRecord_tribe(ctx context.Context, field graphql.CollectedField, obj *twmodel.DailyTribeStats) (ret graphql.Marshaler) { func (ec *executionContext) _DailyTribeStatsRecord_tribe(ctx context.Context, field graphql.CollectedField, obj *twmodel.DailyTribeStats) (ret graphql.Marshaler) {
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
@ -7439,6 +7572,41 @@ func (ec *executionContext) _DailyTribeStatsRecord_createDate(ctx context.Contex
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
} }
func (ec *executionContext) _Ennoblement_id(ctx context.Context, field graphql.CollectedField, obj *twmodel.Ennoblement) (ret graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
fc := &graphql.FieldContext{
Object: "Ennoblement",
Field: field,
Args: nil,
IsMethod: false,
IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.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) _Ennoblement_village(ctx context.Context, field graphql.CollectedField, obj *twmodel.Ennoblement) (ret graphql.Marshaler) { func (ec *executionContext) _Ennoblement_village(ctx context.Context, field graphql.CollectedField, obj *twmodel.Ennoblement) (ret graphql.Marshaler) {
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
@ -9366,6 +9534,41 @@ func (ec *executionContext) _PlayerHistory_items(ctx context.Context, field grap
return ec.marshalOPlayerHistoryRecord2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋtwᚋtwmodelᚐPlayerHistoryᚄ(ctx, field.Selections, res) return ec.marshalOPlayerHistoryRecord2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋtwᚋtwmodelᚐPlayerHistoryᚄ(ctx, field.Selections, res)
} }
func (ec *executionContext) _PlayerHistoryRecord_id(ctx context.Context, field graphql.CollectedField, obj *twmodel.PlayerHistory) (ret graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
fc := &graphql.FieldContext{
Object: "PlayerHistoryRecord",
Field: field,
Args: nil,
IsMethod: false,
IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.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) _PlayerHistoryRecord_player(ctx context.Context, field graphql.CollectedField, obj *twmodel.PlayerHistory) (ret graphql.Marshaler) { func (ec *executionContext) _PlayerHistoryRecord_player(ctx context.Context, field graphql.CollectedField, obj *twmodel.PlayerHistory) (ret graphql.Marshaler) {
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
@ -15207,6 +15410,41 @@ func (ec *executionContext) _ServerStats_total(ctx context.Context, field graphq
return ec.marshalNInt2int(ctx, field.Selections, res) return ec.marshalNInt2int(ctx, field.Selections, res)
} }
func (ec *executionContext) _ServerStatsRecord_id(ctx context.Context, field graphql.CollectedField, obj *twmodel.ServerStats) (ret graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
fc := &graphql.FieldContext{
Object: "ServerStatsRecord",
Field: field,
Args: nil,
IsMethod: false,
IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.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) _ServerStatsRecord_activePlayers(ctx context.Context, field graphql.CollectedField, obj *twmodel.ServerStats) (ret graphql.Marshaler) { func (ec *executionContext) _ServerStatsRecord_activePlayers(ctx context.Context, field graphql.CollectedField, obj *twmodel.ServerStats) (ret graphql.Marshaler) {
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
@ -16429,6 +16667,41 @@ func (ec *executionContext) _Tribe_deletedAt(ctx context.Context, field graphql.
return ec.marshalOTime2timeᚐTime(ctx, field.Selections, res) return ec.marshalOTime2timeᚐTime(ctx, field.Selections, res)
} }
func (ec *executionContext) _TribeChangeRecord_id(ctx context.Context, field graphql.CollectedField, obj *twmodel.TribeChange) (ret graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
fc := &graphql.FieldContext{
Object: "TribeChangeRecord",
Field: field,
Args: nil,
IsMethod: false,
IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.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) _TribeChangeRecord_player(ctx context.Context, field graphql.CollectedField, obj *twmodel.TribeChange) (ret graphql.Marshaler) { func (ec *executionContext) _TribeChangeRecord_player(ctx context.Context, field graphql.CollectedField, obj *twmodel.TribeChange) (ret graphql.Marshaler) {
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
@ -16694,6 +16967,41 @@ func (ec *executionContext) _TribeHistory_items(ctx context.Context, field graph
return ec.marshalOTribeHistoryRecord2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋtwᚋtwmodelᚐTribeHistoryᚄ(ctx, field.Selections, res) return ec.marshalOTribeHistoryRecord2ᚕᚖgithubᚗcomᚋtribalwarshelpᚋsharedᚋtwᚋtwmodelᚐTribeHistoryᚄ(ctx, field.Selections, res)
} }
func (ec *executionContext) _TribeHistoryRecord_id(ctx context.Context, field graphql.CollectedField, obj *twmodel.TribeHistory) (ret graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
fc := &graphql.FieldContext{
Object: "TribeHistoryRecord",
Field: field,
Args: nil,
IsMethod: false,
IsResolver: false,
}
ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.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) _TribeHistoryRecord_tribe(ctx context.Context, field graphql.CollectedField, obj *twmodel.TribeHistory) (ret graphql.Marshaler) { func (ec *executionContext) _TribeHistoryRecord_tribe(ctx context.Context, field graphql.CollectedField, obj *twmodel.TribeHistory) (ret graphql.Marshaler) {
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
@ -22347,6 +22655,11 @@ func (ec *executionContext) _DailyPlayerStatsRecord(ctx context.Context, sel ast
switch field.Name { switch field.Name {
case "__typename": case "__typename":
out.Values[i] = graphql.MarshalString("DailyPlayerStatsRecord") out.Values[i] = graphql.MarshalString("DailyPlayerStatsRecord")
case "id":
out.Values[i] = ec._DailyPlayerStatsRecord_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "player": case "player":
field := field field := field
out.Concurrently(i, func() (res graphql.Marshaler) { out.Concurrently(i, func() (res graphql.Marshaler) {
@ -22469,6 +22782,11 @@ func (ec *executionContext) _DailyTribeStatsRecord(ctx context.Context, sel ast.
switch field.Name { switch field.Name {
case "__typename": case "__typename":
out.Values[i] = graphql.MarshalString("DailyTribeStatsRecord") out.Values[i] = graphql.MarshalString("DailyTribeStatsRecord")
case "id":
out.Values[i] = ec._DailyTribeStatsRecord_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "tribe": case "tribe":
field := field field := field
out.Concurrently(i, func() (res graphql.Marshaler) { out.Concurrently(i, func() (res graphql.Marshaler) {
@ -22567,6 +22885,11 @@ func (ec *executionContext) _Ennoblement(ctx context.Context, sel ast.SelectionS
switch field.Name { switch field.Name {
case "__typename": case "__typename":
out.Values[i] = graphql.MarshalString("Ennoblement") out.Values[i] = graphql.MarshalString("Ennoblement")
case "id":
out.Values[i] = ec._Ennoblement_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "village": case "village":
field := field field := field
out.Concurrently(i, func() (res graphql.Marshaler) { out.Concurrently(i, func() (res graphql.Marshaler) {
@ -23062,6 +23385,11 @@ func (ec *executionContext) _PlayerHistoryRecord(ctx context.Context, sel ast.Se
switch field.Name { switch field.Name {
case "__typename": case "__typename":
out.Values[i] = graphql.MarshalString("PlayerHistoryRecord") out.Values[i] = graphql.MarshalString("PlayerHistoryRecord")
case "id":
out.Values[i] = ec._PlayerHistoryRecord_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "player": case "player":
field := field field := field
out.Concurrently(i, func() (res graphql.Marshaler) { out.Concurrently(i, func() (res graphql.Marshaler) {
@ -24507,6 +24835,11 @@ func (ec *executionContext) _ServerStatsRecord(ctx context.Context, sel ast.Sele
switch field.Name { switch field.Name {
case "__typename": case "__typename":
out.Values[i] = graphql.MarshalString("ServerStatsRecord") out.Values[i] = graphql.MarshalString("ServerStatsRecord")
case "id":
out.Values[i] = ec._ServerStatsRecord_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "activePlayers": case "activePlayers":
out.Values[i] = ec._ServerStatsRecord_activePlayers(ctx, field, obj) out.Values[i] = ec._ServerStatsRecord_activePlayers(ctx, field, obj)
if out.Values[i] == graphql.Null { if out.Values[i] == graphql.Null {
@ -24723,6 +25056,11 @@ func (ec *executionContext) _TribeChangeRecord(ctx context.Context, sel ast.Sele
switch field.Name { switch field.Name {
case "__typename": case "__typename":
out.Values[i] = graphql.MarshalString("TribeChangeRecord") out.Values[i] = graphql.MarshalString("TribeChangeRecord")
case "id":
out.Values[i] = ec._TribeChangeRecord_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "player": case "player":
field := field field := field
out.Concurrently(i, func() (res graphql.Marshaler) { out.Concurrently(i, func() (res graphql.Marshaler) {
@ -24841,6 +25179,11 @@ func (ec *executionContext) _TribeHistoryRecord(ctx context.Context, sel ast.Sel
switch field.Name { switch field.Name {
case "__typename": case "__typename":
out.Values[i] = graphql.MarshalString("TribeHistoryRecord") out.Values[i] = graphql.MarshalString("TribeHistoryRecord")
case "id":
out.Values[i] = ec._TribeHistoryRecord_id(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "tribe": case "tribe":
field := field field := field
out.Concurrently(i, func() (res graphql.Marshaler) { out.Concurrently(i, func() (res graphql.Marshaler) {

View File

@ -1,4 +1,5 @@
type DailyPlayerStatsRecord { type DailyPlayerStatsRecord {
id: Int!
player: Player @goField(forceResolver: true) player: Player @goField(forceResolver: true)
villages: Int! villages: Int!
points: Int! points: Int!

View File

@ -1,4 +1,5 @@
type DailyTribeStatsRecord { type DailyTribeStatsRecord {
id: Int!
tribe: Tribe @goField(forceResolver: true) tribe: Tribe @goField(forceResolver: true)
members: Int! members: Int!
villages: Int! villages: Int!

View File

@ -1,4 +1,5 @@
type Ennoblement { type Ennoblement {
id: Int!
village: Village @goField(forceResolver: true) village: Village @goField(forceResolver: true)
newOwner: Player @goField(forceResolver: true) newOwner: Player @goField(forceResolver: true)
newOwnerTribe: Tribe @goField(forceResolver: true) newOwnerTribe: Tribe @goField(forceResolver: true)

View File

@ -1,4 +1,5 @@
type PlayerHistoryRecord { type PlayerHistoryRecord {
id: Int!
player: Player @goField(forceResolver: true) player: Player @goField(forceResolver: true)
totalVillages: Int! totalVillages: Int!
points: Int! points: Int!

View File

@ -1,4 +1,5 @@
type ServerStatsRecord { type ServerStatsRecord {
id: Int!
activePlayers: Int! activePlayers: Int!
inactivePlayers: Int! inactivePlayers: Int!
players: Int! players: Int!

View File

@ -1,4 +1,5 @@
type TribeChangeRecord { type TribeChangeRecord {
id: Int!
player: Player @goField(forceResolver: true) player: Player @goField(forceResolver: true)
oldTribe: Tribe @goField(forceResolver: true) oldTribe: Tribe @goField(forceResolver: true)
newTribe: Tribe @goField(forceResolver: true) newTribe: Tribe @goField(forceResolver: true)

View File

@ -1,4 +1,5 @@
type TribeHistoryRecord { type TribeHistoryRecord {
id: Int!
tribe: Tribe @goField(forceResolver: true) tribe: Tribe @goField(forceResolver: true)
totalVillages: Int! totalVillages: Int!
totalMembers: Int! totalMembers: Int!