/
alt3rmann
/
graphql-engine
Обзор
Документация
Войти
/
alt3rmann
/
graphql-engine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
server/tests-py/queries/query_cache/setup.yaml
82 строки
2 KB
Samir Talwar
server/tests-py: Fix up the Redis tests so they run.
28 май 2024, 18:12
28 май 2024, 18:12
44ad07e
Код
Авторство
О чём код?
type: bulk args: - type: run_sql args: sql: | create table test_table( first_name text, last_name text ); insert into test_table (first_name, last_name) values ('Foo', 'Bar'), ('Baz', 'Qux'), ('X%20Y', 'Test'); - type: track_table args: schema: public name: test_table - type: create_select_permission args: table: test_table role: user permission: columns: '*' filter: {"first_name": "X-Hasura-User-Id"} - type: run_sql args: sql: | CREATE TABLE "user"( id SERIAL PRIMARY KEY, name TEXT NOT NULL, email TEXT NOT NULL ); INSERT INTO "user" (name, email) VALUES ('Clarke 1', 'clarke1@gmail.com'); INSERT INTO "user" (name, email) VALUES ('Clarke 2', 'clarke2@gmail.com'); - type: track_table args: schema: public name: user - type: create_query_collection args: name: test_collection definition: queries: - name: simple_query_cached query: "query @cached(ttl: 5) { test_table { first_name last_name } }" - type: set_custom_types args: objects: - name: UserId fields: - name: id type: Int! - type: create_action args: name: get_user_by_email definition: type: query arguments: - name: email type: String! output_type: UserId! handler: "{{ACTION_WEBHOOK_HANDLER}}/get-user-by-email" # this action is being created with forward_client_headers set to `true` - type: create_action args: name: get_user_by_email_with_client_header_forwarding definition: type: query arguments: - name: email type: String! output_type: UserId! handler: "{{ACTION_WEBHOOK_HANDLER}}/get-user-by-email" forward_client_headers: true