1

I would like to find out if it is possible to extend a type like the example below where instead of passing in one id (sourceContactId) it is possible to pass in multiple ids. The reason being is that at the moment it will call the contactById method for each addressbook row.

extend type ReportedLossesOutputDto {
sourceContact: ContactFullOutputDto!
@Delegate(schema: "addressbook", path: "contactById(id: $fields:sourceContactId)")
}

Basically we would like to reduce the amount of times the contactById method gets called. For example if there are 10 address book rows, it currently calls the contactById method 10 times. Is there a way to have maybe a method called "contactsById", which is called once?

Majid Hajibaba
  • 3,105
  • 6
  • 23
  • 55
sspikker
  • 11
  • 1
  • this has been answered by Michael Staib on github: "This is going to be addressed with the august release." https://github.com/ChilliCream/hotchocolate/issues/3827 – sspikker Jun 15 '21 at 10:37

0 Answers0