5 points · by Liriel · 4y ago · 7 comments
To this day, I've never seen one, inherited one, or met someone who uses them in production. I'm sure HN has some happy GraphQL users, and there are some big companies outside Facebook that use it, but it must still be a tiny fraction of all APIs at this point.
Tooling and caching are certainly still a lot simpler with REST APIs, and the vast majority of projects just don't need the extra efficiency.
You don't design your APIs in a vacuum. You have use cases. You should have basic ones still. You build your API v0 against those use cases, not against your data model or your architecture.
Then you _monitor_ usage, you _consult/discuss_ with your users to see how to refine/augment your API to better serve their needs.
REST or anything else matters little, as long as you do the job: listen and understand your user needs (it doesn't happen only once) and adapt.
There are already a few solutions that do this.
It's not unsafe as long as you're using a DBMS with row-level security (like Postgres) and you have a reasonable query timeout (probably < 1s) to prevent DoS attacks.
Says who?