4 ms·
This is good. Curious what was the usecase for this solution ?
by x_stealth 6y ago
This is good.
Curious what was the usecase for this solution ?
- graphql2rest 6y agoWe had an internal GraphQL API driving our product and users asked for a public API that will provide that functionality programmatically. We offered to expose our GraphQL API publicly (or some subset/version of it), but the majority of our customers insisted on getting a REST API. (They had good reasons to ask for REST: they were used to RESTful APIs in our previous API offerings, it seemed that the market adoption of GraphQL for public APIs is not that wide, etc.) In any case, we had to offer a REST flavor of the API providing the same functionality we had already implemented in GraphQL, and instead of writing a new REST API (and then testing it, maintaining it, and keeping both parity over time...) or manually wrapping the existing GraphQL operations -- we decided to develop a graphql-to-rest converter that we later open sourced. You can read all about it here: https://medium.com/swlh/graphql-api-or-rest-api-why-not-have-both-c4171e68900a https://medium.com/swlh/graphql-api-or-rest-api-why-not-have... Other people might have different use cases for using it - that's also mentioned in the article.