SOFA

REST APIs from your GraphQL schema

SOFA takes your GraphQL schema, looks for the available queries, mutations and subscriptions, and turns all of them into a REST API, with an OpenAPI definition to match. Part of the Hive ecosystem by The Guild.

Why SOFA

Your schema, served twice

Mount SOFA as middleware and every operation in the schema is reachable over REST, with the GraphQL execution underneath.

Read the introduction
import { useSofa } from 'sofa-api';
import express from 'express';

const app = express();

app.use(
  '/api',
  useSofa({
    basePath: '/api',
    schema,
  }),
);

// GET /api/users        -> query { users }
// POST /api/add-user    -> mutation { addUser }

Learn more

Discover the complete ecosystem of tools and libraries

Complete GraphQL Federation Stack

Our libraries to support all your GraphQL needs

Explore the Ecosystem