Have you ever built a Go API using GORM that worked perfectly in development, only to discover in production that a single endpoint was returning 500MB+ responses and bringing your server to its knees?


I did. And it took me days to figure out why.

The culprit? GORM's association loading combined with Go's default JSON serialization—a deadly...