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
Extend nested filter input-types (#143) to allow filter-depth configuration per relation.
@FilterableRelation('relation',()=>Relation,{// This one does not work yetfilterDepth: 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)classEntityA{/* ... */}// 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)classEntityB{/* ... */}// 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.
The text was updated successfully, but these errors were encountered:
hedwiggggg
changed the title
Extend nested filter input-types (https://github.com/TriPSs/nestjs-query/pull/143) to allow filter-depth configuration per relation.
Extend nested filter input-types to allow filter-depth configuration per relation.
May 30, 2023
Extend nested filter input-types (#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.
The text was updated successfully, but these errors were encountered: