hasura / hasura/graphql-engine

Allow sorting by computed fields

Open
#4,356 15 comments 62 reactions 1 assignee Claimed by @0x777 View on GitHub
a/api/graphql c/server k/enhancement p/longterm t/data-connectors t/native-dbs
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

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)
)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.