|
|
|
|
|
by BenjieGillam
2322 days ago
|
|
It's not generally safe to expose SQL to untrusted clients. For example, PostgreSQL 12.2 was released yesterday and fixed a security issue where `ALTER ... DEPENDS ON EXTENSION` did not have any privilege check whatsoever. SQL is also not at all well suited for the needs of frontend web app developers - just ask Facebook about their experiences with FQL! Using an API that's more ergonomic for the frontend, such as GraphQL, backed by a language which is optimised for the backend, such as SQL, is the best of both worlds. |
|
Postgrahile is the best of both worlds, providing a nice GraphQL interface on top of your database.
If you decide you need to write crud endpoints, you have your database still. It's a zero-cost abstraction, which is wild.