4

I'm using graphql with Dataloader. I have the next query:

users {
  products(isDeleted: false, categoryId: 23) {
    name
    price
  }
}

I have property resolver:

productsLoader = new DataLoader(keys => this.productsService.load(keys));
async products(@Parent() user, @Args() args) {
  // what about args here???
  this.productsLoader.load(user.id);
}

How should I pass args into productsService.load() method in a correct way?

Sergiy
  • 611
  • 7
  • 16

0 Answers0