Hi :slightly_smiling_face:  Just for my curiosity...
# orm-help
y
Hi 🙂  Just for my curiosity I tested two pieces of code with the same result. the left side retrieves the user’s posts with prisma, the right side, prisma searches only the user and searches the post in the user’s post fields. the two results are the same, the difference is that the N+1 problem occurs on the right. so what i’m wondering is… 1. if solve the N+1 problem(right side), is the left/right code style a difference in my taste ? 2. when using nexus, except for query resolver, in what cases do you use type field resolver ? 🤔 in my opinion, two cade are exactly the same, just written differently.
a
when you use include you get all posts with user in one query when you make new query in the posts resolvers this query will requested one time for every one user I have an option for this i already use call Prisma select plugin https://paljs.com/plugins/select also you can use pal to generate all CRUD and Types for you https://paljs.com/generator/nexus
👍 1