Do Prisma resolve N+1 problem?
E.g. I take 100 users with their friends, for example. Will it optimize queries (make 2 and combine data or use joins)? Or it will run 101 query?
Prisma will load data efficiently in those cases (2 queries). Prisma has a data loader that will first fetch the users with one query and will then make a deferred pass to fetch all friends.
thank you! great news)
Thanks for bringing up this question, @Terion
I agree with what you said on Slack - this should be part of our documentation. I’d be happy to review a PR that adds a respective section.