6f4efc2b
feat(graph): the read-only GraphQL schema at /query
Eight query fields over the service layer, no Mutation and no Subscription — the design defers mutations until the proposal state machine settles, and TestSchemaHasNoMutations stands guard on that. Access is fail-closed and gated before parse, matching web's ACL exactly, so introspection is treated as content too. A federating api.sr.ht must therefore present a token or skip us, which costs one log line. A malformed rev is reported as a GraphQL error rather than folded into null. service/ deliberately hides malformed-versus-absent from probing, but the caller here is already authenticated as the owner or its own agent, and a bare null for rev=proposals/42 is indistinguishable from an absent document — it reads as a silently dropped argument. Proposal listing declares its port but is unwired: service/ exposes no proposal read yet, and returning an empty list would tell a reviewer their queue is clear when it is merely unread.
bigbes <bigbes@gmail.com> — 2026-07-22 15:07:22 UTC
Commit 6f4efc2b70da87a9dc49ce079a609b9777ee63ed —
view raw patch
Parent(s):
e0938e94
| File | Status | + | − |
|---|---|---|---|
go.mod
|
M | +2 | -2 |
graph/api/generated.go
|
A | +8080 | |
graph/generate.go
|
A | +18 | |
graph/gqlgen.yml
|
A | +30 | |
graph/graph_test.go
|
A | +1075 | |
graph/model/models.go
|
A | +95 | |
graph/model/models_gen.go
|
A | +99 | |
graph/resolver.go
|
A | +106 | |
graph/schema.graphqls
|
A | +294 | |
graph/schema.resolvers.go
|
A | +448 | |
graph/server.go
|
A | +155 |