这是indexloc提供的服务,不要输入任何密码
Skip to content

server/postgres: use computed fields in order_by expression #7103

@rakeshkky

Description

@rakeshkky

Enable using computed fields in order_by clause. For example, we have a table student_marks which contains integer columns for various courses to store marks obtained. We defined a computed field total_marks which is basically a total sum of marks. We need to query student details sorted by total_marks

query {
  student_marks(order_by: {total_marks: desc}){
       student_id
       total_marks
  }
}

Metadata

Metadata

Assignees

Labels

c/serverRelated to server

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions