From 3630773eedb8c0d66aed4d6db9764e8ad0bff68a Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Wed, 8 Jan 2025 23:52:54 +0100 Subject: [PATCH] some gql fixes. Fuck me. --- internal/web/gqlSchema.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/web/gqlSchema.go b/internal/web/gqlSchema.go index 96ee87d..372533f 100644 --- a/internal/web/gqlSchema.go +++ b/internal/web/gqlSchema.go @@ -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 }