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
733 B
Go
16 lines
733 B
Go
// Package graph is the GraphQL layer behind POST /graphql.
|
|
//
|
|
// graph/schema/*.graphql is the source of truth; gqlgen regenerates
|
|
// generated.go and model/models_gen.go (never edit them). gqlgen.yml maps
|
|
// object types onto the GORM structs in backend/models.
|
|
//
|
|
// Nothing guards the endpoint itself. A field is protected only by an
|
|
// @admin or @signedIn directive (directives.go); a field with neither is
|
|
// public. directives_test.go fails if a mutation has neither and isn't on its
|
|
// public allow-list. Finer rules (post ownership, hiding private messages)
|
|
// live in resolvers via IsAdminFromCtx / UserIDFromCtx.
|
|
//
|
|
// gqlgen may move hand-written code in *.resolvers.go; _helpers.go files are
|
|
// untouched.
|
|
package graph
|