Closed fbucek closed 3 years ago
You can implement with other key type, e.g BatchFn<(usize, usize)>
, but in this case (1, 20) and (1, 30) is treat as two different request.
Thanks for suggestion, I have tried Arc<Mutex<Config>>
mutex, so I can set variables for method in struct which implements BatchFn, but then I have realized that I do not know how to do SQL query to return for X items last X attributes.
For example for last 10 authors get last 10 books. Now it is 11 queries, but I do not know how to make it in 2 queries in SQL regardless of dataloader.
I am closing, thanks for advice. I will try it when I solve SQL problem.
I am using async_graphql and dataloader and it works fine.
But when I want to limit output using
last
argument. I do not know how to do this with dataloader.Getting books is called like this in graphql object ( without data loader )
When using dataloader I do not know how to make it work.
Maybe I just overlooked something or just do not have mu day, but I do not know how to solve it. Thanks for suggestion.