Live data from Hacker News

Prisma – Database tools for modern application development

prisma.io

21–30 of 88 posts

Re: Prisma – Database tools for modern application development

#22

Earlier quoted context omitted.

Do you have examples of specific requirements for which Prisma would be a good fit?

Prisma is good for writing data models, running migrations. The new admin is very usable already, although still beta. I've been very productive loading, editing and querying data. Hasura I think is good for preexisting db, no migrations? I haven't evaluated it fully.

(I work at Hasura)

Yep! We’ve put in a lot of effort to ensure hasura Just Works on an existing db.

Incidentally, to address your last point, Hasura has its own rails like migrations system and an admin UI (that allows DDL and DML) and works well with your existing migrations tooling too if you have it already. The hasura admin UI can create the rails style migration files automatically on your disk as you work on the UI.

https://hasura.io/all-features

Re: Prisma – Database tools for modern application development

#23
post #21

Pardon the ignorance because the site isn’t super clear - but is this just an ORM library for the JavaScript/Typescript ecosystem? How does it “replace” a traditional ORM exactly?

It's a GraphQL ORM and it runs in it's own process on top of whatever db you have, whether Mongo or Postgres. You can use it with any programming language but I think their support is best for Node and Go.

Re: Prisma – Database tools for modern application development

#24
post #19

Back when prisma was emerging out of graphcool, every google documentation search sent me to graphcool, every graphcool page was full of broken links, and the shiny new prisma docs were unusable (including unviewable on my iPad that I use for researching tech I might use while sitting on the couch). It painted such a clear picture of a company that absolutely does not get the importance of API documentation to the su…

I would say their docs are pretty good. It's pretty easy to pick up a Prisma app in just a single afternoon.

Re: Prisma – Database tools for modern application development

#25
post #10
post #7

This is amazing! What about Python?

Don't the Django ORM and Django Admin do the same thing?

Prisma admin is much better for editing relationships. Write graphql queries with deep multilevel joins and then double click to edit any fields you see in the results. Very different experience than django.

Re: Prisma – Database tools for modern application development

#26
post #22

Earlier quoted context omitted.

Prisma is good for writing data models, running migrations. The new admin is very usable already, although still beta. I've been very productive loading, editing and querying data. Hasura I think is good for preexisting db, no migrations? I haven't evaluated it fully.

(I work at Hasura) Yep! We’ve put in a lot of effort to ensure hasura Just Works on an existing db. Incidentally, to address your last point, Hasura has its own rails like migrations system and an admin UI (that allows DDL and DML) and works well with your existing migrations tooling too if you have it already. The hasura admin UI can create the rails style migration files automatically on your disk as you work on th…

First time learning about Hasura. Looks really promising with the built-in _live queries_ support, which Prisma has not yet implemented (they only have subscriptions): https://github.com/prisma/prisma/issues/1205

EDIT: Never mind, looking at the docs, it looks like they also only support subscriptions... It's understandable to not have support for live queries yet, as it's still a very under-explored territory, but it's still misleading marketing on their part because they explicitly call out support for subscripts _and_ live queries on their website.

Curious how Hasura tackles the N+1 problem for efficient querying in GraphQL? Prisma uses a built-in dataloader implementation for this but I couldn't find anything about query optimization in the Hasura docs.

Also, in the docs on pagination: https://docs.hasura.io/1.0/graphql/manual/queries/pagination...

I'm only seeing examples of offset-based pagination. Is cursor-based pagination on the roadmap as well?

Re: Prisma – Database tools for modern application development

#27
post #21

Pardon the ignorance because the site isn’t super clear - but is this just an ORM library for the JavaScript/Typescript ecosystem? How does it “replace” a traditional ORM exactly?

It's a GraphQL ORM and it runs in it's own process on top of whatever db you have, whether Mongo or Postgres. You can use it with any programming language but I think their support is best for Node and Go.

Ah so this is similar to Hasura.

Re: Prisma – Database tools for modern application development

#29
I’ve tried Prisma over the last few months, but eventually decided against adopting it in our product because it seems very inflexible when working with many-to-many relationships. In particular, filtering on foreign keys doesn’t seem possible and requires SQL table joins, which (in our case) has an immensely negative performance impact. Also, the query chaining API doesn’t lend itself well to filtering on multiple relationships. Apart from that, the idea seems really cool and I’m sure the project has a great future ahead of it!

Re: Prisma – Database tools for modern application development

#30
Prisma looks good and I hope it succeeds.

Another interesting and unique approach I'd love to see get more attention is Mammoth[0]. Instead of abstracting the database away, you define columns using its raw primitives (in this case, Postgres) and in return get a type-safe client, along with auto-generated migrations.

I imagine this approach allows you to leverage the features of the database much more easily. And Postgres has quite a lot of rich features to take advantage of! :)

[0]: https://github.com/Ff00ff/mammoth

Post reply on HN