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]>
16 lines
391 B
Go
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
|
|
}
|