Trading Networks 10.7 | Administering and Monitoring B2B Transactions | Service Development Help | Working with GraphQL Descriptors | How Integration Server Uses Dataloader in Resolver Service | Using personLoader in friendsResolver Resolver Service
 
Using personLoader in friendsResolver Resolver Service
The following steps allow the friendsResolver resolver service to use the personLoader loader service for the query in the example.
1. To fetch the list of friends for a single person (for single parent ID), invoke the pub.graphql:loadMany in the friendsResolver service.
2. Prepare the friendsResolver resolver inputs.
a. Map the ids of friends to the input of parent.
b. Create a keyDocs document list and map it to the keys field of the pub.graphql:loadMany service. This maps the ids of friends to the input of the pub.graphql:loadMany service.
c. Save the service.