# graphql-hive/SOFA

The best way to create REST APIs - Generate RESTful APIs from your GraphQL Server

Repository: https://github.com/graphql-hive/SOFA
Canonical: https://ross.abutalabs.com/products/graphql-hive-sofa
Homepage: https://www.the-guild.dev/graphql/sofa-api
Language: TypeScript
License: MIT
License Family: permissive
Topics: api, graphql, openapi, rest, swagger
Last push: 2026-06-30T02:48:54+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 44, longevity 100
- inputs: {"age_days": 2828, "days_push": 64, "days_rel": 160, "gap_med": 232.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1118, forks 92 (observed 2026-08-28T04:03:39.274391+00:00)

## What it is
SOFA (sofa-api) is a Node.js library that automatically generates a fully RESTful API from an existing GraphQL schema, turning queries, mutations, and subscriptions into REST endpoints. It also generates OpenAPI/Swagger documentation and supports integrations with Express and other frameworks.

## Use cases
- generate REST API from GraphQL schema
- expose REST endpoints for existing GraphQL server
- support legacy REST clients while using GraphQL backend
- auto-generate OpenAPI Swagger docs from GraphQL
- migrate from REST to GraphQL incrementally
- serve GraphQL subscriptions as webhooks

## When to choose
- you already have a GraphQL schema and need REST endpoints for existing clients
- you want auto-generated, always up-to-date API documentation
- you want a one-line setup REST gateway over GraphQL

## When to avoid
- you are building a REST-only stack with no GraphQL schema
- you need fine-grained manual control over every REST route's behavior
- your project is not on Node.js

## Facets
- artifact type: library
- maturity: active
- function: api-framework, graphql, api-gateway, middleware, api-documentation
- domain: apis, web-development, backend
- platform: cross-platform
- tags: rest-api-generation, openapi, swagger, graphql-to-rest, express, the-guild, graphql, nodejs, web-server

## Member repositories
- graphql-hive/SOFA (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:39.274391+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:41:47.857707+00:00, confidence not recorded.
  - readme: https://github.com/graphql-hive/SOFA (fetched 2026-08-28T04:03:39.274391+00:00, sha 724994676aee)
  - homepage: https://www.the-guild.dev/graphql/sofa-api (fetched 2026-08-29T12:45:19.973909+00:00, sha 6dfb82e2124b)
  - site_page: https://the-guild.dev/graphql/sofa-api/docs (fetched 2026-08-29T12:45:19.983153+00:00, sha 0f72a31de1c5)
  - site_page: https://the-guild.dev/about-us (fetched 2026-08-29T12:45:19.985818+00:00, sha 4c4f11519fb9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
