I just migrated my codebase from prisma-binding to...
# orm-help
v
I just migrated my codebase from prisma-binding to the new prisma-client. I’m noticing a significant slowdown in my app, 4-5 seconds to load the home page vs 1-2 seconds before. Rolling back the commit will undo the problem. Has anyone else encountered this?
It appears that it is because of a nested relation. Imagine that we do something like: User Resolver: posts: return ctx.prisma.user({ id }).posts(); Post Resolver: picture: return ctx.prisma.post({ id }).picture(); First, we retrieve all of the posts in the user resolver. Then, we make additional requests to the server in the post resolver, one for each post Is this expected, and what is the recommended method of doing this? Before, with prisma bindings, I was only making one call to the server which return all the information I needed as specified by my client
It appears that this has already been filed: https://github.com/prisma/prisma/issues/3586
The resolution appears to be use prisma-binding for now, and they are working on a way to retrieve deep nested relations in a performant way soon “$deep”