mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 04:51:35 +03:00
efec0bf9ca
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3489 Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com> GitOrigin-RevId: f09a75508545cdbc34cf8728fad95bbb00bde018
25 lines
1.1 KiB
YAML
25 lines
1.1 KiB
YAML
description: Explain query with limit and order by with an object relationship's column
|
|
url: /v1/graphql/explain
|
|
status: 200
|
|
query:
|
|
query:
|
|
query: |
|
|
query {
|
|
article(limit: 2, order_by: {author: {id: desc}}){
|
|
id
|
|
title
|
|
content
|
|
}
|
|
}
|
|
response:
|
|
- field: article
|
|
sql: 'SELECT coalesce(json_agg("root" ORDER BY "root.or.author.pg.id" DESC NULLS
|
|
FIRST), ''[]'' ) AS "root" FROM (SELECT "_2_root.or.author"."root.or.author.pg.id"
|
|
AS "root.or.author.pg.id", row_to_json((SELECT "_3_e" FROM (SELECT "_0_root.base"."id"
|
|
AS "id", "_0_root.base"."title" AS "title", "_0_root.base"."content" AS "content" )
|
|
AS "_3_e" ) ) AS "root" FROM (SELECT * FROM "public"."article" WHERE
|
|
(''true'') ) AS "_0_root.base" LEFT OUTER JOIN LATERAL (SELECT "_1_root.or.author.base"."id"
|
|
AS "root.or.author.pg.id" FROM (SELECT * FROM "public"."author" WHERE (("_0_root.base"."author_id")
|
|
= ("id")) LIMIT 1 ) AS "_1_root.or.author.base" ) AS "_2_root.or.author" ON (''true'') ORDER
|
|
BY "root.or.author.pg.id" DESC NULLS FIRST LIMIT 2 ) AS "_4_root" '
|