Skip to content
New issue

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

Specified relationName is not honoured for mutations and aggregations #239

Closed
coupster74 opened this issue Mar 26, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@coupster74
Copy link

coupster74 commented Mar 26, 2024

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:

  1. 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:
image

nor are the resulting mutations:
image

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
@coupster74 coupster74 added the bug Something isn't working label Mar 26, 2024
@TriPSs
Copy link
Owner

TriPSs commented Mar 26, 2024

Thanks for reporting, I see I only updated the read relations resolver and not the others.

TriPSs added a commit that referenced this issue Mar 26, 2024
@TriPSs
Copy link
Owner

TriPSs commented Mar 26, 2024

Should be fixed in v5.1.0-alpha.2

@TriPSs TriPSs closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants