2021-09-21 13:39:34 +03:00
|
|
|
description: Explain query with limit and order by table column
|
|
|
|
url: /v1/graphql/explain
|
|
|
|
status: 200
|
|
|
|
query:
|
|
|
|
query:
|
|
|
|
query: |
|
|
|
|
query {
|
|
|
|
article(limit: 5, order_by: {author_id: desc}){
|
|
|
|
id
|
|
|
|
title
|
|
|
|
content
|
|
|
|
}
|
|
|
|
}
|
|
|
|
response:
|
|
|
|
- field: article
|
2022-06-08 18:31:28 +03:00
|
|
|
sql: "SELECT coalesce(json_agg(\"root\" ORDER BY \"root.pg.author_id\" DESC NULLS\
|
2022-07-07 19:50:17 +03:00
|
|
|
\ FIRST), '[]' ) AS \"root\" FROM (SELECT \"_0_root.base\".\"author_id\" AS\
|
|
|
|
\ \"root.pg.author_id\", row_to_json((SELECT \"_1_e\" FROM (SELECT \"_0_root.base\"\
|
|
|
|
.\"id\" AS \"id\", \"_0_root.base\".\"title\" AS \"title\", \"_0_root.base\".\"\
|
|
|
|
content\" AS \"content\" ) AS \"_1_e\" ) ) AS \"root\" FROM (SELECT\
|
|
|
|
\ * FROM \"public\".\"article\" WHERE ('true') ORDER BY \"author_id\" DESC\
|
|
|
|
\ NULLS FIRST LIMIT 5 ) AS \"_0_root.base\" ORDER BY \"root.pg.author_id\"\
|
2022-06-08 18:31:28 +03:00
|
|
|
\ DESC NULLS FIRST ) AS \"_2_root\" "
|