Heya, first of all thanks a lot for a ll the hard work you are putting into nexus and nexus-prisma!
With the way things currently are, resolver performance has a tendency to go down the drain with nested queries, since the dataloader isn't here yet and prisma2 is only able to handle one request at a time.
One way I found to speed thing up a little is by overriding the most widely used relations resolve function to include a check whether root/parent already includes the relevant field ( if, for example they were already fetched by photons eager loading select/include), and manually fetch them otherwise.
I think making this behaviour baseline could help bridging the gap until the prisma2 binary supports concurrency and both prismaa & nexus-prisma had time to implement their own dataloader.
If you could point me in the right direction I'd also be more than happy to take a look at this myself.
Heya, first of all thanks a lot for a ll the hard work you are putting into nexus and nexus-prisma!
With the way things currently are, resolver performance has a tendency to go down the drain with nested queries, since the dataloader isn't here yet and prisma2 is only able to handle one request at a time.
One way I found to speed thing up a little is by overriding the most widely used relations
resolve
function to include a check whetherroot
/parent
already includes the relevant field ( if, for example they were already fetched by photons eager loadingselect
/include
), and manually fetch them otherwise.I think making this behaviour baseline could help bridging the gap until the prisma2 binary supports concurrency and both prismaa & nexus-prisma had time to implement their own dataloader.
If you could point me in the right direction I'd also be more than happy to take a look at this myself.