question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow sorting by computed fields

See original GitHub issue

It 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:open
  • Created 3 years ago
  • Reactions:58
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
FickleLifecommented, Nov 18, 2020

+1 Would be amazing to have this.

4reactions
mikejackowskicommented, Jun 28, 2021

Is there any chance this gets bumped from “p/longterm” to something closer to a more immediate development/release?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found