Allow sorting by computed fields
See original GitHub issueIt would be so great if Hasura supports computed field in order by Eg:
{
show(order_by: {
show_distance(args: {lat: 77.7843636, long: 9.4664509}): asc
}) {
...ShowDetails
}
}
Function created for Computed field show_distance
ST_Distance(
ST_Transform(location::Geometry, 3857),
ST_Transform(ST_SetSRID(ST_MakePoint(lat, long), 4326), 3857)
)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:58
- Comments:15 (2 by maintainers)
Top Results From Across the Web
3. How to enable sorting on calculated fields? - Books by Agiliq
You can do this by setting the admin_order_field attribute on the calculated field method.
Read more >django admin enable sorting for calculated fields
Now, I want to enable sorting for this field. In reality, all I need to do is to add a column in my...
Read more >Allow Sorting - Data Controllers / Fields - Code On Time
However, if a calculated field is created by a developer, sorting must be explicitly allowed. Ability to sort may also be disabled on...
Read more >Sorting Dimensions by Calculated Fields That Use Table ...
The ability to sort a dimension by a calculated field that uses a table calculation is currently not built into the product. However...
Read more >sorting on a calculated field | Customer Engagement ...
Hi Laura, Sorting a calculated field column works however, if you have a lot of records, it will slow down the loading of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1 Would be amazing to have this.
Is there any chance this gets bumped from “p/longterm” to something closer to a more immediate development/release?