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

Infinite depth in DTO but not in suscriptions #220

Open
VelaJafet opened this issue Jan 18, 2024 · 3 comments
Open

Infinite depth in DTO but not in suscriptions #220

VelaJafet opened this issue Jan 18, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@VelaJafet
Copy link

Hello, i'm reading your documentation.

I read that I can add the next to modify the filterInput in the DTO, it works!

image

And in the suscriptions I can filter but is setup like filterDepth: 0 'cause I can't access to the direct relations

image

image

Have you thought about to add the same logic to the filter of suscriptions? I have to do some weird things to filter created/updated things in front end, for example validate that the createdElement has the same company with a useEffect instead just get the createdElement that is mine

@VelaJafet VelaJafet added the enhancement New feature or request label Jan 18, 2024
@TriPSs
Copy link
Owner

TriPSs commented Jan 18, 2024

That's a good question, I'm not sure we can support inifity depth as those filters (If I remember correctly) are stringified and stored in a map, so that could potentially bring some issues.

What would the needed depth be for your use case?

@TriPSs
Copy link
Owner

TriPSs commented Jan 18, 2024

The filtering on subscriptions also wrok different as in they are not filtered on the database currently but on the plain object itself, so that would maybe explain why you can't filter on relations.

PS: I'm on my phone so can't check how to implementation currently is.

@VelaJafet
Copy link
Author

VelaJafet commented Jan 22, 2024

That's a good question, I'm not sure we can support inifity depth as those filters (If I remember correctly) are stringified and stored in a map, so that could potentially bring some issues.

What would the needed depth be for your use case?

I have the next entity:

Log:

  • id
  • companyId
  • others fields like deletedAt, concepto, etc as you can see in the last screenshot

I just can access to the filter strings, numbers but not to the directs relations like company->id, it seems like depthFilter is 0 :s, i just need depthFilter: 1 or 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants