FieldResolver for an array of object #1466
-
Hi, Here is my problem :
And I resolve the owner of the cart with a type resolver :
But, when I do a query for multiple carts, the FieldResolver will be called once for each cart. Which is inefficient. Is there a way to achieve this ? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@carlocorradini thanks, for more details :
And in the resolver :
The users are effectivelly loaded once magically. |
Beta Was this translation helpful? Give feedback.
See
graphql dataloader