Replies: 1 comment
-
@rpf3 This is correct. The execution engine batches the DataLoader calls and executes the DataLoader when it does not execute anything else. Meaning, we execute as long as we can, when we have nothing to do, we dispatch the dataloaders. if in your case the comments were not dataloaded, but rather on the Post itself with a sync resolver/property. It's likely that also these would make it into the first batch to the users table. The dataloader also makes sure that the user with id |
Beta Was this translation helpful? Give feedback.
-
I'm looking for guidance on the recommended way to implement resolvers with the following data model:
When I query for posts, I see two database queries to the User table, the first for the Post and the second for all the comments. I thought I understood that the data loader was supposed to bundle these together. But as I thought about it, I realized that it would have no way of knowing to wait for the response of the comment data loader. So I am thinking that I am missing something but I've been scouring the documentation and example workshop repositories and am unable to see where I am going wrong here.
Beta Was this translation helpful? Give feedback.
All reactions