3 ms·
It's my impression that hasura caters more to (also) those that need to integrate with an existing database and schema, possibly with views and functions - woul
by e12e 6y ago
It's my impression that hasura caters more to (also) those that need to integrate with an existing database and schema, possibly with views and functions - would that be accurate?
Does it make sense to slap prisma on top of an existing g production database?
- tango12 6y ago(I'm from Hasura). It was a definitely a design goal for us to make the existing production database use-cases as seamless as possible. Instead of adding a new DSL on top of the database, Hasura maps much of the DML subset of SQL over to GraphQL (tables, views, functions) so that we're not re-inventing that bit and the translation is restricted to the "relation set" to "tree" transformation. json aggregation and json operations in Postgres are phenomenal! Hasura's authz RLS-like layer injects authorization in as well to make that GraphQL API actually useful. JOOQ has probably done the most phenomenal job in mapping almost all database constructs to a native language library, but there's a solid amount of type magic there which I'm not sure is portable to every language.
- lukaseder 6y ago> but there's a solid amount of type magic there which I'm not sure is portable to every language. It is, but I've just been too lazy so far to actually do it.
- sorenbs 6y agoIt certainly make ssense to use Prisma with an existing database. In fact, Prisma is able to introspect your database and create a typesafe data access client for you. If you give it a try and have a database handy, I bet you can have it up and running in less than 10 minutes.
- e12e 6y agoThank you both for replies (hasura and prisma). Regarding prisma, I see my impression was off a bit from talking with our team that used prisma in a green field project with migrations quite happily. And I somehow forgot that migrations are still marked experimental and are kind of new. https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-migrate/ https://www.prisma.io/docs/reference/tools-and-interfaces/pr...