We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug I have a virtual relation in my DTO
@ObjectType('Test') @Relation('user', () => UserDto, { dtoName: 'UserDetails', relationName: 'user', nullable: true, }) @QueryOptions({ defaultResultSize: 100 }) export class TestDto { @IDField(() => ID) id: string; @FilterableField({ nullable: true }) status: number; @FilterableField(() => GraphQLJSONObject, { nullable: true }) Details: TestDetailsDto; }
@QueryService(TestEntity) export class TestEntityRelationQueryService extends RelationQueryService<TestEntity> { constructor( @InjectQueryService(TestEntity) queryService: QueryService<TestEntity>, @InjectQueryService(UserEntity) usrQueryService: QueryService<UserEntity>, ) { super(queryService, { user: { service: usrQueryService, query(t) { return { filter: { id: { eq: t.Details.UserId } } }; }, }, }); } }
It's working fine without assembler. But when I add assembler :
@Module({ imports: [ TypeOrmModule.forFeature([TestEntity, UserEntity]), NestjsQueryGraphQLModule.forFeature({ imports: [ NestjsQueryTypeOrmModule.forFeature([ TestEntity, UserEntity, ]), ], assemblers: [TestAssembler], services: [ TestEntityRelationQueryService, ], resolvers: [ { DTOClass: TestDto, ServiceClass: TestEntityRelationQueryService, AssemblerClass: TestAssembler, }, { DTOClass: UserDto, EntityClass: UserDto }, ], }), ], }) export class EntitiesModule {}
The virtual relation is not found (TestEntityRelationQueryService is not used at all)
Yes
To Reproduce Steps to reproduce the behavior:
Expected behavior It should use custom RelationQueryService when Assembler is define
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
I have a virtual relation in my DTO
It's working fine without assembler.
But when I add assembler :
The virtual relation is not found (TestEntityRelationQueryService is not used at all)
Have you read the Contributing Guidelines?
Yes
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should use custom RelationQueryService when Assembler is define
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: