quick question, if I were to continue working with...
# orm-help
r
quick question, if I were to continue working with prisma 1 for now, how easy would it be to migrate to prisma2 when it is more production ready?
h
We already have a conversion tool that takes datamodel v1 or 1.1 and converts it to datamodel v2. It will be not that difficult and we will have a migration guide for you.
m
Very very difficult because Prisma2 is NOT backwards compatible with Prisma1. They removed support for subscriptions and they're removing the GraphQL layer entirely. It's also not even a microservice anymore, so it's really a completely different product with nothing in common. Prisma1 is a microservice that converts between SQL and GraphQL and supports the OpenCRUD spec. Prisma2 is just an ORM like TypeORM that does nothing else
@rein We still use Prisma because we're locked in, but if you're just getting started, you should definitely choose TypeORM because Prisma2 is just a less mature version of that
r
I get the feeling you lost a bit of faith in Prisma then? Doesn't Prisma2 also handle stuff like relations etc where you would normally have to set up dataloader etc from scratch?
it seems TypeORM has also its share of problems, 800 open issues and no full time development currently.
h
I am sorry Mike that you feel that way for Prisma. Well Prisma 1 was the core execution used by GraphCool which inherently had some severe performance issues for some use cases. That is why we rewrote Prisma 1 incorporating the feedback we received from the community. That is why we eliminated to second server as most people don't want to manage a second and rewrote the core from scratch in Rust to avoid memory issues which many people were reporting With the improvements there surely will be breaking changes. That is why we are releasing this as Prisma v2. But we can surely make the migration path easy by providing tooling for it like many other tools does. Also, please note that Prisma 1 will be maintained and will get bug fixes over time. I you all have any specific issue I will happy to address that.
There are also differences between typeORM and Prisma. You can't use TypeORM in a plain JavaScript application. In the future, we will release a SDK for Prisma v2 which will allow you to fetch data from any source using the type-safe API that photon provides. That means you can read and write even to Google Sheet with Prisma.
We see Prisma as a ORM replacement, a different set of tooling for data access
m
Clearly Prisma2 is a step backwards from Prisma1. It might be more performant, but the feature set is drastically reduced. Prisma1 did everything that Prisma2 did with additional features. So if you get started on Prisma1, you need to make sure that you don't accidentally use one of the features that's being cut from Prisma2. It's possible that Prisma2 has some advantages/disadvantages over TypeORM/Sequelize, but it's ultimately just an ORM whereas Prisma1 was actually a complete GraphQL DAL. The exact same thing happened with Graphcool where Prisma1 was a step backwards from Graphcool. It's a pattern. Prisma3 will be just a "Hello World" app.