some gql fixes. Fuck me.

This commit is contained in:
Niklas Kapelle 2025-01-08 23:52:54 +01:00
parent 11109897f4
commit 3630773eed
Signed by: niklas
GPG Key ID: 4EB651B36D841D16

View File

@ -168,8 +168,9 @@ func createShema(repo repo.Repo) graphql.Schema {
},
},
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
id, ok := p.Args["id"].(model.PlayerID)
id, ok := p.Args["id"].(string)
if !ok {
log.Println("Failed to parse ID at player: %v", p.Args["id"])
return nil, nil
}
@ -190,8 +191,9 @@ func createShema(repo repo.Repo) graphql.Schema {
},
},
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
id, ok := p.Args["id"].(model.GameID)
id, ok := p.Args["id"].(string)
if !ok {
log.Println("Failed to parse ID at game: %v", p.Args["id"])
return nil, nil
}
@ -212,8 +214,9 @@ func createShema(repo repo.Repo) graphql.Schema {
},
},
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
id, ok := p.Args["id"].(model.GameResultID)
id, ok := p.Args["id"].(string)
if !ok {
log.Println("Failed to parse ID at gameResult: %v", p.Args["id"])
return nil, nil
}