ChilliCream/graphql-platform

DataLoader used inside node resolvers do not batch

tomachristian opened this issue · 0 comments

Product

Hot Chocolate

Version

14.0.0

Link to minimal reproduction

https://gist.github.com/tomachristian/c523f8d196b76edc4924f8235543f889

Steps to reproduce

After upgrading to the final version of 14 we noticed that all our node resolver fields that use data loaders do not properly batch (it works for all other non-'node' fields). I think I nailed it down to the introduction of this #7556. The node field no longer has the ParallelExecutable flag, so the data loaders do not batch, they just get scheduled immediately.

What is expected?

That upon two node queries in the same request, using the same data loader, would yield a single load inside the data loader (a single SQL query, in our case).

What is actually happening?

Upon two node queries in the same request, using the same data loader, it yields TWO separate loads inside the data loader (two SQL queries, in our case).

Relevant log output

No response

Additional context

No response