@FilterableRelation('relation', () => Relation, {
// This one does not work yet
filterDepth: 2,
})
Describe the solution you'd like
Requires further customization in the /nestjs-query/packages/query-graphql/src/types/query/filter.type.ts file. At Object.keys(filterableRelations).forEach((field) => { the filterDepth of the relation should be considered (only if set), not the filterDepth of the parent element.
// Example-A.entity.ts
@ObjectType('EntityA')
@FilterableRelation('relation', () => relation)
class EntityA { /* ... */ }
// leads to
// input EntityAFilter {
// # should generate depending on the `filterDepth` of `EntityA`
// relation: EntityAFilterRelationFilter
// }
// Example-B.entity.ts
@ObjectType('EntityB')
@FilterableRelation('relation', () => relation, { filterDepth: 2 )
class EntityB { /* ... */ }
// leads to
// input EntityBFilter {
// # should generate a filter type of depth 2
// relation: EntityBFilterRelationFilter
// }
This is not a critical feature for me personally, so I will look at this in the future when I have more resources available again.
Extend nested filter input-types (https://github.com/TriPSs/nestjs-query/pull/143) to allow filter-depth configuration per relation.
Describe the solution you'd like
Requires further customization in the
/nestjs-query/packages/query-graphql/src/types/query/filter.type.ts
file. AtObject.keys(filterableRelations).forEach((field) => {
thefilterDepth
of the relation should be considered (only if set), not thefilterDepth
of the parent element.This is not a critical feature for me personally, so I will look at this in the future when I have more resources available again.