News for hackers. Stuff that matters.
Re:We Can Do Better Than SQL by unodgs on Tuesday August 11, 2020 @02:20AM (#24117648)
Recently I tried using SQL directly on the frontend: https://medium.com/@unodgs/sql-on-the-frontend-react-postgre... as an alternative to GraphQL which I also find too complicated. You might find this interesting.
Re:We Can Do Better Than SQL by simonw on Tuesday August 11, 2020 @02:34AM (#24117724)
I've been experimenting with SQL as an API language - including client-side SQL constructed in JavaScript - fir a couple of years with my Datasette project.

I'm using similar security tricks to you: read-only queries with a time limit, against SQLite rather than PostgreSQL.

More here: https://simonwillison.net/2018/Oct/4/datasette-ideas/ and https://github.com/simonw/datasette

Re:We Can Do Better Than SQL by unodgs on Tuesday August 11, 2020 @02:57AM (#24117847)
Great to see that! Did it work well for you?
Re:We Can Do Better Than SQL by shean_massey on Tuesday August 11, 2020 @04:33AM (#24118378)
It took me a solid month before graphql finally "clicked" but there's no going back now, I absolutely prefer it over rest now. 10/10 would do again and do suggest everybody give it a try.
Re:We Can Do Better Than SQL by devxpy on Tuesday August 11, 2020 @10:44AM (#24120760)
This makes a ton of sense to me, thanks for sharing your learnings.

I see very little value in using GraphQL, when you can just write SQL on the client!

We desperately need frameworks to better facilitate this, like Hasura or Django -- DB migrations, permissions, authentication, real-time subscriptions, Admin UI.

My most wanted feature is SQL type providers, like Rezoom.SQL - https://github.com/rspeele/Rezoom.SQL