ChilliCream / ChilliCream/graphql-platform

Nested DataLoaders are not dispatched during mutations

Open
#8,261 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ hot chocolate Area: DataLoader
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Product

Hot Chocolate

Version

15.1.3

Link to minimal reproduction

https://github.com/dannyheard7/NestedDataLoaderNotDispatchedInMutation

Steps to reproduce

Run the application and send the following mutation:

mutation {
    addProductCatalog(input:  {
       id: 1
    })
}
What is expected?

The GetProductByIdAsync dataloader is dispatched from GetProductCatalogByIdAsync instantly

What is actually happening?

The GetProductByIdAsync never dispatches/takes a very long time to dispatch.

Additional context

The following query runs the same code, however in this case the nested data loader is dispatched instantly

query {
  productCatalog(id: 1) {
    id
  }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal reproduction at github.com/dannyheard7/NestedDataLoaderNotDispatchedInMutation and run the addProductCatalog mutation from the report. Compare its nested GetProductByIdAsync dispatch with the productCatalog query, where dispatch is immediate. Done means the nested dataloader dispatches promptly during the mutation as it does during the query.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.