Skip to content

DataLoader used inside node resolvers do not batch #7635

Closed

Description

@tomachristian

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

Activity

  1. added this to the HC-14.1.0 milestone on Oct 22, 2024
  2. changed the title [-]Data loaders used inside node resolvers do not batch[/-] [+]DataLoader used inside node resolvers do not batch[/+] on Oct 25, 2024
  3. self-assigned this
    on Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions