The issue for me was that if we use populate: false, the resolver would be returning an array of IDs, which GraphQL would complain about, since it's not of type Hobby.
I have personally used an approach where I specify extra GraphQL field populatedHobbies of type [Hobby] and keep hobbies endpoint, which would return [ID]
Right, I was looking into that as well.
The issue for me was that if we use
populate: false
, the resolver would be returning an array of IDs, which GraphQL would complain about, since it's not of typeHobby
.I have personally used an approach where I specify extra GraphQL field
populatedHobbies
of type[Hobby]
and keephobbies
endpoint, which would return[ID]
Good idea !