bd2d8a36
doltsrht: serve /query and the api-meta.json beside it
The schema is mounted where /mcp is and for the same three reasons — before web's same-origin group, before the cookie middleware, in a group of its own — plus one of its own: it answers anonymous callers, so it cannot ride core-go's WithSchema, whose router 401s an un-cookied request. It does need the config and database middleware, which is why the group sits below them. The file beside it is not optional. meta.sr.ht fetches api-meta.json from every service it discovers and iterates each one's scopes to build the personal-token page, so a service that mounts its own /query owes the instance this too — and the scope list is what makes "dolt.sr.ht/repos:RO" offerable there at all. The never-null rule that makes a mistake here a 500 for the WHOLE instance lives in ecore's apimeta; a test asserts the name this service advertises is the one authn.RepoScope enforces. README says what the surface serves and what it deliberately does not, and that `hut graphql dolt` needs the patched hut — upstream segfaults on any service outside its hard-coded list.
Eugene Blikh <bigbes@gmail.com> — 2026-08-15 10:17:19 UTC
Commit bd2d8a3680e62716440ea0165d2271d79f9d526e —
view raw patch
Parent(s):
ecfc6bb2
| File | Status | + | − |
|---|---|---|---|
README.md
|
M | +44 | |
cmd/doltsrht/graphql.go
|
A | +62 | |
cmd/doltsrht/graphql_test.go
|
A | +39 | |
cmd/doltsrht/main.go
|
M | +27 | |
cmd/doltsrht/main_test.go
|
M | +78 | |
config.example.ini
|
M | +16 |