server

command
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

gat example server.

One huma source of truth → three typed surfaces out:

REST     (huma's native)          GET    /projects, /projects/{id}
GraphQL  (gat)                    POST   /api/graphql
gRPC     (gat, via connect-go)    POST   /api/grpc/{service}/{method}

Schema views (gat)
GET /api/schema/graphql           SDL or introspection JSON
GET /api/schema/proto             FileDescriptorSet (binary)
GET /api/schema/openapi           re-emitted OpenAPI document

The handlers are written once with huma.Operation + a typed (*Input) → (*Output, error) function. Swapping `huma.Register` for `gat.Register` is the only change needed to surface an op via the other transports.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL