graphql-engine/server/tests-py/queries/v1/metadata/export_metadata.yaml
Auke Booij ee7c7b1672
server: allow computed fields to have access to Hasura's session variables (fix #3846) (#4486)
* Allow computed fields to have access to Hasura's session variables

* Inform about session args for computed fields in changelog and docs

* Add tests for session arguments for computed fields (and the respective errors)

Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
Co-authored-by: Marion Schleifer <marion@hasura.io>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
2020-04-27 17:07:03 +02:00

47 lines
975 B
YAML

description: Export metadata
url: /v1/query
status: 200
response:
version: 2
tables:
- table:
schema: public
name: article
object_relationships:
- name: author
using:
foreign_key_constraint_on: author_id
- table:
schema: public
name: author
array_relationships:
- name: articles
using:
foreign_key_constraint_on:
column: author_id
table:
schema: public
name: article
comment: List all articles of the author
computed_fields:
- name: get_articles
definition:
function:
schema: public
name: fetch_articles
table_argument: author_row
- name: test_session
definition:
function:
schema: public
name: test_session
session_argument: session
functions:
- function:
schema: public
name: search_articles
query:
type: export_metadata
args: {}