Ad

Sofa: REST APIs from GraphQL

Sofa transforms GraphQL schemas into RESTful APIs. It simplifies API creation by generating endpoints from GraphQL queries, mutations, and subscriptions.
Screenshot of graphql-hive/SOFA homepage

Sofa empowers developers to easily build REST APIs from existing GraphQL schemas. It analyzes your GraphQL schema and automatically generates corresponding REST endpoints, handling queries, mutations, and subscriptions. By treating certain GraphQL types as 'Models', Sofa offers flexibility in how data is exposed in REST API responses, allowing for efficient data transmission and controlled access. Sofa handles complex GraphQL features, including subscriptions and custom execution logic, streamlining the API development process.

Sofa simplifies REST API generation from GraphQL, offering flexibility in data exposure using 'Models'. It supports subscriptions, custom execution logic, and OpenAPI/Swagger generation. The library provides straightforward methods for customizing HTTP methods, paths, and response status codes. It also supports customizing depth limits and using custom request execution.

  • GraphQL Schema Conversion: Automatically generates REST endpoints from GraphQL types.
  • Model Support: Allows fine-grained control over data exposure in REST responses.
  • Subscription Handling: Enables running GraphQL subscriptions via WebHooks.
  • OpenAPI/Swagger Generation: Provides OpenAPI specifications for API documentation.
  • Customization: Offers options to modify HTTP methods, paths, and response codes.
  • Custom Execution: Allows developers to define custom logic for handling GraphQL operations.
  • Authentication: Supports both basic and bearer token authentication.

Sofa is an actively developed project with recent commits and an engaged community. Documentation is comprehensive and includes practical examples. Regular updates suggest ongoing maintenance and improvement. The project demonstrates a stable development pattern and is suitable for production deployments.

Sofa benefits developers seeking a streamlined approach to creating REST APIs from GraphQL. It's ideal for projects needing fast API development, flexible data representation, and comprehensive API documentation. Its ability to handle subscriptions and customize API behavior differentiates it from simpler GraphQL-to-REST converters or manual implementation.

Summarize:
Share:
Stars
1,117
Forks
92
Issues
39
Created
7 years ago
Commit
23 days ago
License
MIT
Archived
No
Updated 16 days ago

Similar Repositories