graphql-engine/server/tests-py/queries/subscriptions/live_queries/setup.yaml
Vamshi Surabhi 98c853f4f7
use only required session variables in multiplexed queries for subscriptions (#4329)
* use only required session variables in multiplexed queries for subscriptions

This will reduce the load on Postgres when the result of a subscription
is not dependent on the session variables of the request

* add DerivingVia to the project wide extension list

* expose a more specific function to filter session variables

* improve documentation of session variables of a cohort

Co-Authored-By: Alexis King <lexi.lambda@gmail.com>

* fix bad rebase

* add test for checking only required session variables are used to make query

Co-authored-by: Alexis King <lexi.lambda@gmail.com>
Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
2020-11-03 13:45:22 +05:30

39 lines
682 B
YAML

type: bulk
args:
- type: run_sql
args:
sql: |
create table hge_tests.test_t2(
c1 int,
c2 text
);
- type: track_table
args:
schema: hge_tests
name: test_t2
- type: run_sql
args:
sql: |
create table hge_tests.articles(
id serial primary key,
content text,
title text,
is_public bool default false
);
- type: track_table
args:
schema: hge_tests
name: articles
- type: create_select_permission
args:
table:
schema: hge_tests
name: articles
role: public
permission:
columns:
- title
- content
filter:
is_public: true