4 ms·
You might find something like Hasura interesting. https://hasura.io/ https://hasura.io/ It is a GraphQL server that sits on top of your Postgres DB and the sc
by danielrhodes 5y ago
You might find something like Hasura interesting.
https://hasura.io/ https://hasura.io/
It is a GraphQL server that sits on top of your Postgres DB and the schema reflects the table schema. It's quite powerful right out of the box.
If you combine that on the front-end with Apollo and a Typescript types code generator, you end up with strong typing all the way from your database to the front-end.
- TameAntelope 5y agoI went with Prisma + Nexus + Pal.js + Apollo, which was probably at least two layers too complex. I'm looking, still, for an all-in-one solution to this, though I do need more control over my queries/mutations than what Hasura would give me.
- hellcow 5y agoWhen faced with this problem, I wound up using normal SQL migrations to set the DB state, sqlc to generate the SQL boilerplate (https://sqlc.dev/ https://sqlc.dev/), and I wrote a little tool to generate the HTTP handler boilerplate for these tables. Not all-in-one, but this approach has been really effective in a large codebase.
- sramam 5y ago(Apologies for going off-topic) I am working on a solution to simplify this piece of the puzzle and seeking feedback for an early version of the solution. Please DM me (email in profile) and we can set something up.
- gedw99 5y agothere is an open source golang project that does the same thing called GraphJin. has GUi tooling also. https://github.com/dosco/graphjin https://github.com/dosco/graphjin You give it the Postresql script and you will see the new GraphQL schema in he GUI, ready to test. This means that is only one change point ever - the sql. It also supports subscriptions. for CI you can just put the script into your git tree and it will pick them up at the start of a deploy update.