3 ms·
I have a GraphQL field that converts tweet-like content from the database into token lists so that individual clients don't need to implement their own tweet-pa
by andrewingram 8y ago
I have a GraphQL field that converts tweet-like content from the database into token lists so that individual clients don't need to implement their own tweet-parsing logic. I have many other examples.
If it was really feasible to bind our databases directly to our APIs, we wouldn't need to hire anyone except DBAs and front-end developers. But backend business logic is a thing. You may not need it, but most people do.
- steve-chavez 8y agoThe database is more than just tables, for your particular example you could use a computed column https://postgrest.org/en/v5.0/api.html#computed-columns https://postgrest.org/en/v5.0/api.html#computed-columns. In general, custom business logic can be done through stored procedures/views/computed columns.
- andrewingram 8y ago"Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should." You can do a lot in the database, a lot more than most developers realise, that doesn't mean it's a good idea.