4 ms·
Sometimes you can use postgrest, postgraphile, hasura, or some similar contraption to just get a REST or GraphQL API with no effort. Then you can handle the fin
by CameronNemo 4y ago
Sometimes you can use postgrest, postgraphile, hasura, or some similar contraption to just get a REST or GraphQL API with no effort. Then you can handle the final presentation bits on the client side. Business logic that must exist as non-SQL code can be implemented easily with various REST or graphql frameworks. In Python, for example, you can use FastAPI or Strawberry for nice type safe APIs.
It does take an extra layer of code in many cases, sure. But the architecture is cleaner IMO. Presentation layer lives in one codebase, with a clean link to the data via the API layer. The API layer can abstract different data sources or workflows.