You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generic way of populating document ids (typegoose)
#1239
This will be very verbose when having large models with lots of references to other collections, because we need to define a very similar field resolver each time. So my question is if anyone has an idea to do this in a generic way? Maybe with a custom decorator to be used instead of the @field decorator? Something like:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I have a user model like:
Now I want to be able to populate the profile_image_id through GraphQL so I need to create a field resolver for the profile_image_id param:
user.resolver.ts
This will be very verbose when having large models with lots of references to other collections, because we need to define a very similar field resolver each time. So my question is if anyone has an idea to do this in a generic way? Maybe with a custom decorator to be used instead of the @field decorator? Something like:
All reactions