Ighor Martins
06/28/2021, 10:21 AMnikolasburk
How different is prisma 2 performance wise? How does it compare with Hasura now?We don't have any concrete benchmarks unfortunately, but I would assume that Prisma 2 is quite a bit faster than Prisma 1 just by virtue of the new architecture and not needing to run an extra server 🙂
Knowing that I’ll have to write the entire graphql server myself, it means that simply writing resolver for each entity will end up in a lot of queries to the database for just a single graphql query with nested resource, right?In GraphQL, this problem is typically solved using the DataLoader pattern which enables you to batch DB queries. Prisma Client has an integrated DataLoder already, so you don't need to implement that manually as you'd have to with other ORMs or when writing plain SQL yourself 🙂 We have an entire docs page about this topics as well: https://www.prisma.io/docs/guides/performance-and-optimization/query-optimization-performance Finally, we haven't been seeing many people complain about actual performance issues with Prisma yet. And if that happened, we worked very deliberately with them to resolve the problem in the particular scenarios. So, if you ever run into issues with performance, please let us know by opening a GitHub issue so we can improve the situation. Hope that helps 🙌
Ighor Martins
06/28/2021, 10:58 AMnikolasburk