All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m36s
Move Query/Mutation field declarations from the monolithic schema.graphql into each domain's .graphql file using extend type, so gqlgen places resolvers in the matching *.resolvers.go files. Extract helper functions into *_helpers.go files to prevent gqlgen from commenting them out. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
558 B
Go
23 lines
558 B
Go
package graph
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"adam-french.co.uk/backend/graph/model"
|
|
"adam-french.co.uk/backend/services"
|
|
)
|
|
|
|
func mapSteamGames(games []services.SteamRecentGame) []*model.SteamGame {
|
|
result := make([]*model.SteamGame, len(games))
|
|
for i, g := range games {
|
|
result[i] = &model.SteamGame{
|
|
AppID: g.AppID,
|
|
Name: g.Name,
|
|
Playtime2Weeks: g.Playtime2Weeks,
|
|
PlaytimeForever: g.PlaytimeForever,
|
|
HeaderImageURL: fmt.Sprintf("https://cdn.akamai.steamstatic.com/steam/apps/%d/header.jpg", g.AppID),
|
|
}
|
|
}
|
|
return result
|
|
}
|