Specified relationName is not honoured for mutations and aggregations
Closed this issue · 2 comments
Describe the bug
When a relationship name is specified in the definition, in v5.1.0-alpha.1 it appears to be working on the entity results (wasn't in the ^4.0.0 version I was using before). However, aggregate functions are still being pluralized and the relationship name is not being used
Have you read the Contributing Guidelines?
yes
To Reproduce
Steps to reproduce the behavior:
- for a relationship, specify the name, example below:
@FilterableUnPagedRelation('ofInterestTo', () => Company, {
relationName: 'ofInterestTo',
nullable: true,
update: { enabled: true },
remove: { enabled: true },
})
when you view the fields available, you see aggregate results are not honoring the relationship name:
nor are the resulting mutations:
Expected behavior
Mutations and aggregate graphql attributes/objects should also adhere to the relationship name specified.
Desktop (please complete the following information):
- Node Version v18.14.0
- Nestjs-query Version: 5.0.0-alpha.1
Thanks for reporting, I see I only updated the read relations resolver and not the others.
Should be fixed in v5.1.0-alpha.2