// the find
graphql-hive/SOFA
The best way to create REST APIs - Generate RESTful APIs from your GraphQL Server
SOFA turns an existing GraphQL schema into a REST API by walking the schema and auto-generating GET/POST routes for each query and mutation. It's for teams that already run GraphQL internally but need to hand a REST interface to consumers (legacy clients, third-party integrators, webhook-only systems) without maintaining two separate APIs by hand.
Route generation is convention-based off the schema itself (Query.chat -> GET /chat/:id), so REST endpoints stay in sync with the GraphQL layer instead of drifting out of a hand-written controller. The 'Models' concept (any type with a singular+plural query and an id field) automatically collapses nested objects to references instead of dumping full object graphs into every response, which is the right default for REST payload size. OpenAPI/Swagger generation comes from the same schema walk, so you get documentation for free rather than a second artifact to maintain. It's framework-agnostic middleware (raw http, Express-style) rather than a full server, so it drops into an existing Node stack cleanly.
Subscriptions are exposed as a stateful webhook-registration API (POST /webhook to start, DELETE to stop, POST to update) — that's an unusual contract for consumers and pushes subscription lifecycle management onto whoever's calling this, which is more moving parts than most REST clients expect. Per-route customization (method, path, status code) is manual and per-field via a routes map, so a large schema means a lot of config entries rather than any smarter default. There's no built-in pagination, filtering, or sorting convention for list endpoints — you get whatever your GraphQL query already returns. Access control isn't addressed at all beyond passing through a context object; if your schema wasn't designed with REST exposure in mind, it's easy to unintentionally expose fields/resolvers that were fine behind a single GraphQL endpoint but shouldn't be individually addressable over REST.