2021-09-23 22:59:12 +03:00
|
|
|
description: The explained Postgres subscription in our documentation
|
|
|
|
url: /v1/graphql/explain
|
|
|
|
status: 200
|
|
|
|
response:
|
2023-01-27 17:36:35 +03:00
|
|
|
sql: "SELECT \"__subs\".\"result_id\" , \"__fld_resp\".\"root\" AS \"result\" FROM\
|
|
|
|
\ UNNEST(($1)::uuid[], ($2)::json[]) AS \"__subs\"(\"result_id\", \"result_vars\"\
|
|
|
|
) LEFT OUTER JOIN LATERAL (SELECT json_build_object('user', \"_user\".\"root\"\
|
2022-07-22 18:27:42 +03:00
|
|
|
\ ) AS \"root\" FROM (SELECT coalesce(json_agg(\"root\" ), '[]' ) AS \"root\"\
|
2023-01-27 17:36:35 +03:00
|
|
|
\ FROM (SELECT row_to_json((SELECT \"_e\" FROM (SELECT \"_root.base\".\"name\"\
|
|
|
|
\ AS \"name\" ) AS \"_e\" ) ) AS \"root\" FROM (SELECT * FROM \"\
|
|
|
|
public\".\"user\" WHERE ('true') ) AS \"_root.base\" ) AS \"_root\" \
|
|
|
|
\ ) AS \"_user\" ) AS \"__fld_resp\" ON ('true') "
|
2021-09-23 22:59:12 +03:00
|
|
|
plan:
|
2022-07-22 18:27:42 +03:00
|
|
|
- Nested Loop Left Join (cost=40.01..42.28 rows=100 width=48)
|
2023-01-27 17:36:35 +03:00
|
|
|
- ' -> Function Scan on __subs (cost=0.01..1.00 rows=100 width=16)'
|
2021-09-23 22:59:12 +03:00
|
|
|
- ' -> Materialize (cost=40.00..40.03 rows=1 width=32)'
|
|
|
|
- ' -> Subquery Scan on \"user\" (cost=40.00..40.02 rows=1 width=32)'
|
|
|
|
- ' -> Aggregate (cost=40.00..40.01 rows=1 width=32)'
|
2022-07-22 18:27:42 +03:00
|
|
|
- ' -> Seq Scan on \"user\" user_1 (cost=0.00..22.00 rows=1200
|
|
|
|
width=32)'
|
2021-09-23 22:59:12 +03:00
|
|
|
- ' SubPlan 1'
|
|
|
|
- ' -> Result (cost=0.00..0.01 rows=1 width=32)'
|
|
|
|
query:
|
|
|
|
query:
|
|
|
|
query: |
|
|
|
|
subscription getUsers {
|
|
|
|
user {
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
2022-07-22 18:27:42 +03:00
|
|
|
operationName: getUsers
|