nestjs-query
nestjs-query copied to clipboard
One to many relation
I need to have a one to many relation otherwise the object design is not applicable.
@Field(() => [CareerLevel], { nullable: true })
@Prop({ type: [CareerLevelSchema]})
careerLevels!: Array<CareerLevel>;
This cannot generate the types automaticallly
Have you read the Contributing Guidelines?
yes
Describe the solution you'd like I like that i can define one to many relations
Describe alternatives you've considered there are no alternatives
@FBurner it looks like you may have figured this out based on the other issue, but you would just leave the @Field
decorator off and add it as a relation.
ok, done that seems to work properly, can i somehow use the same relation input type parameters in a custom crudresolver? Is there an example of overwritten resolver relation methods?