-
-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Milestone
Description
In readme, How to build nesting/relations?, says that relations go like this:
UserTC.addRelation(
'friends',
{
resolver: () => UserTC.getResolver('findByIds'),
prepareArgs: { // resolver `findByIds` has `_ids` arg, let provide value to it
_ids: (source) => source.friendsIds,
},
projection: { friendsIds: 1 }, // point fields in source object, which should be fetched from DB
}
);
This is mean that graphql-compose-mongoose
execute .find
then for each property it's run .findByIds
? instead of populate
?
two or more calls instead one?