Hacker News new | ask | show | jobs
by valstu 1265 days ago
Are there any ”api from postgres db” projects that are written in Node.js?
6 comments

I was about to say “but this one is!” and realized I had confused PostgREST with PostGraphile. If you’re interested in GraphQL, you can check out PostGraphile here: https://github.com/graphile/postgraphile

It’s interesting to me that PostgREST and Hasura are written in Haskell, but PostGraphile is not. Given the complexity in parsing arbitrary GQL queries I think I assumed that Haskell was a better fit for the job, hence the mixup!

Prisma has pivoted to be “just” a Node.JS ORM a few years ago (I work there). You can still use it to build an API of course, but you will need some additional tool or libraries.
Why did Prisma pivot to this? It sounded to me that offering a ready-to-go GraphQL API ala Firebase was a great idea and could certainly turn good profits.
Maybe.

We observed that people migrated off as soon as the applications went into production or were serious, as the database<->api approach did not actually give them all the flexibility they wanted.

(This was 3 years ago, the players that stayed in that market or entered later, of course learned from that and adapted. So I hear they are making their users happy. As are we as an ORM.)

Directus is actually one. You get the front end which is basically an admin UI, but you also get a full blown fully featured REST API

https://directus.io/

Out of curiosity why would you prefer a DB foundation implemented in Node over a mature project in Haskell?
Yes, but like most large FOSS Node projects, they're dead or under-maintained (huge number of GitHub issues). There are none I'd use today.
Are you aware of supabase? It's rather nice.