graphql-platform
graphql-platform copied to clipboard
Nested DataLoaders are not dispatched during mutations
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
}
}
DataLoader nesting is not supported in Mutations. This has to do with a change we did in the executor for mutations. With V16 we will introduce a new executor for mutations.