graphql-engine/server/tests-py/queries/v1/metadata/export_metadata.yaml
Lyndon Maydwell 59c01786fe Optimistic Metadata Locking
Add optimistic concurrency control to the ‘replace_metadata’ call.

Prevents users from submitting out-of-date metadata to metadata-mutating APIs.

See https://github.com/hasura/graphql-engine-mono/issues/472 for details.

GitOrigin-RevId: 5f220f347a3eba288a9098b01e9913ffd7e38166
2021-02-19 02:40:23 +00:00

47 lines
978 B
YAML

description: Export metadata
url: /v1/metadata
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: {}