3 ms·
What happens if your company now needs to expose their API (or parts of it) as an open, public API? Many API users (organizations, companies) expect a standard
by graphql2rest 5y ago
What happens if your company now needs to expose their API (or parts of it) as an open, public API? Many API users (organizations, companies) expect a standard REST API and don't want to learn a new technology or have to install new client libraries just to perform CRUD operations on your data. Good luck trying to educate your enterprise customers.
So you start coding a new REST API just for the public API use case, having to test, maintain and keep parity with the GraphQL version over time? This package allows you to get a RESTful API for free (and customize it per your needs), based on your existing GraphQL.
Another use case is exactly for what you described, when a company wished to replace their REST API with GraphQL:
An old REST API can be migrated to a new GraphQL API gradually, by first building the GraphQL API and using GraphQL2REST to generate a REST API on top of it, seamlessly. That new REST API will have the same interface as the old one, and the new implementation can then be tested, endpoints migrated in stages, until a full migration to the underlying GraphQL API takes place.
- Jaxkr 5y agoGot it, thanks!