Files
stpweb/backend/graph/slice_helpers.go
T
adamfandClaude Opus 5.5 4530cb8dc4
Test and deploy / test (push) Successful in 28s
Test and deploy / deploy (push) Successful in 31s
Trim comments to the non-obvious why
Drop narration, history and restated-code comments across the repo,
keep short ones for security boundaries, upstream quirks and ordering
constraints, and record the convention in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 20:49:03 +00:00

16 lines
391 B
Go

package graph
// This file is hand-written and is never regenerated by gqlgen — it is not
// named after a schema file, so `gqlgen generate` leaves it alone.
// ptrs turns []T into []*T for gqlgen. Loading into []*T directly would
// change the SQL GORM emits.
func ptrs[T any](xs []T) []*T {
result := make([]*T, len(xs))
for i := range xs {
result[i] = &xs[i]
}
return result
}