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

Add support for relational sorting on queries #27

Closed
Tworley96 opened this issue Mar 11, 2020 · 1 comment · Fixed by #29
Closed

Add support for relational sorting on queries #27

Tworley96 opened this issue Mar 11, 2020 · 1 comment · Fixed by #29
Milestone

Comments

@Tworley96
Copy link

Currently sorting is only supported for direct fields on a model, I.e. name_asc. Add support for sorting based on rel field -> relation_name_asc.
Note: Currently enums are used for the sorting params, creating this many enums may to much and it might be better to switch to a string representation instead. (I.e. "model.field" instead of an enum for each field of each relationship

@davidism
Copy link
Member

In 1.0 I switched from enums to strings, although it still only supports local columns. But filters allow traversing relationships, so we can reuse the same logic.

@davidism davidism added this to the 1.1.0 milestone Aug 3, 2024
@davidism davidism transferred this issue from autoinvent/magql Aug 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants