Hacker News new | ask | show | jobs
by jensneuse 976 days ago
> Many organizations choose REST over GraphQL due to more established conventions, simplicity, and the ability to leverage standard HTTP features directly.

I strongly disagree with this. REST APIs are usually a complete mess and follow no conventions at all. Even if OpenAPI is being used, the majority of OAS documents have errors or are entirely broken. I'm Working on tooling to automatically parse OAS and transform it to GraphQL schemas. There's not a single day where we don't find another broken OAS. Compare that to GraphQL where we now have powerful linters for schemas etc... But even without, the average GraphQL API is definitely in better shape than the average REST API, and that's simply because the tooling enforces better boundaries. You might have a correct OAS vs every GraphQL server actually follows the GraphQL spec.

1 comments

> The average GraphQL API is definitely in better shape than the average REST API

Totally agree.

GraphQL tooling is generally just better. It enforces a Schema first workflow and thus more emphasis on conventions and design.

OpenAPI tends to be an after thought with teams building REST APIs. Swagger started out as a way to add docs and generate SDKs.

That was exactly my motivation for building openapi-stack. GraphQL-like tooling, but for teams using REST.

That's fantastic and I hope to see more of this.