mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 21:12:09 +03:00
6e8da71ece
(Work here originally done by awjchen, rebased and fixed up for merge by jberryman) This is part of a merge train towards GHC 9.2 compatibility. The main issue is the use of the new abstract `KeyMap` in 2.0. See: https://hackage.haskell.org/package/aeson-2.0.3.0/changelog Alex's original work is here: #4305 BEHAVIOR CHANGE NOTE: This change causes a different arbitrary ordering of serialized Json, for example during metadata export. CLI users care about this in particular, and so we need to call it out as a _behavior change_ as we did in v2.5.0. The good news though is that after this change ordering should be more stable (alphabetical key order). See: https://hasurahq.slack.com/archives/C01M20G1YRW/p1654012632634389 PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4611 Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com> GitOrigin-RevId: 700265162c782739b2bb88300ee3cda3819b2e87
24 lines
951 B
YAML
24 lines
951 B
YAML
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
|
|
sql: "SELECT coalesce(json_agg(\"root\" ORDER BY \"root.pg.author_id\" DESC NULLS\
|
|
\ FIRST), '[]' ) AS \"root\" FROM (SELECT 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\", \"_0_root.base\".\"author_id\" AS \"root.pg.author_id\" 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\"\
|
|
\ DESC NULLS FIRST ) AS \"_2_root\" "
|